[Tutor] getpass

Mike Nickey mnickey at gmail.com
Sat Jun 16 07:44:37 CEST 2012


Hey all,

I'm working on a bit of code here and I'm having an issue with
getpass. In the documentation, it says it hides the text entered

"Prompt the user for a password without echoing." --
http://www.python.org/doc//current/library/getpass.html

However when I run it in Eclipse, the password is clear as day.

Here is a snippet of the code that I am working with. Any assistance
would be greatly appreciated.
=====
        ...
        print 'Connected to Gmail' + '\n'
        try:
            gmail_user = str(raw_input('Enter your email: ')).lower().strip()
            gmail_pwd = getpass.getpass('Enter your email password: ').strip()
            smtpserver.login(gmail_user, gmail_pwd)

-- 
~MEN


More information about the Tutor mailing list