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


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.

Last edited by Yoriz on Tue Oct 01, 2013 10:03 am, edited 1 time in total.
Reason: First post lock
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.
Due to the reasons discussed here we will be moving to on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 7 guests