Not able to import getpass in my code

This is the place for queries that don't fit in any of the other categories.

Not able to import getpass in my code

Postby pushkar27 » Tue Oct 01, 2013 5:28 am

HI,

I have a requirement to get input for username and password from the console. For entering the password I am using password=getpass.getpass('Enter password')
I have also given an import getpass in the beginning but on execution my code throws and ImportError : no module named getpass
I even tried to set the pythonpath using export pythonpath=/usr/lib/python2.4/site-packages:/usr/lib/python2.4
Still getting the same error.
Please help.

Thanks
Pushkar
Last edited by Yoriz on Tue Oct 01, 2013 10:03 am, edited 1 time in total.
Reason: First post lock
pushkar27
 
Posts: 1
Joined: Tue Oct 01, 2013 5:24 am

Re: Not able to import getpass in my code

Postby Yoriz » Tue Oct 01, 2013 10:04 am

Hi, Welcome to the forum.
Please ensure you read the 'new users read this' link in my signature.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 764
Joined: Fri Feb 08, 2013 1:35 am
Location: UK


Return to General Coding Help

Who is online

Users browsing this forum: buran and 2 guests