[Tutor] Help with file I/O.

Nathan Pinno falcon3166 at hotmail.com
Wed Aug 3 23:13:33 CEST 2005


When I ran my new password program, using getpass, it warned me that 
passwords might be echoed, because there was a problem with getpass. How do 
I fix this?
----- Original Message ----- 
From: "Alan G" <alan.gauld at freenet.co.uk>
To: "Nathan Pinno" <falcon3166 at hotmail.com>; "Alberto Troiano" 
<albertito_g at hotmail.com>; "Danny Yoo" <dyoo at hkn.eecs.berkeley.edu>; "luke" 
<rabidpoobear at gmail.com>
Cc: <tutor at python.org>
Sent: Sunday, July 31, 2005 6:19 PM
Subject: Re: [Tutor] Help with file I/O.


>>> You might find the getpass module useful for that...
>>> It provides a raw_input style prompt that doesn't
>>> display what the user types...
>
>> Does it display stars instead?
>
> No, its more secure than that, it doesn't display anything.
>
> But like anything in Python the esiest way to find out is just to try it 
> at the >>> prompt.
>
>>>> import getpass
>>>> pw = getpass.getpass('Password: ')
> Password:
>>>> print pw
> mysecret
>>>>
>
> HTH
>
> Alan G
> 


More information about the Tutor mailing list