[Tutor] Contents of Tutor digest, help with Hangman program

bob gailer bgailer at gmail.com
Mon Jul 19 16:57:11 CEST 2010


On 7/19/2010 7:37 AM, John Palmer wrote:
> Hi Alan thanks for the help. I did try the getpass module, I think I 
> used:
>
> getpass.getpass()
>
> This actually prompted the user to enter a password, which isn't 
> really what I want. Unless there's something i'm missing with this 
> module? I'll take another look anyway.

Reading the documentation (15.7 in Python 3):

The getpass module provides two functions:

getpass.getpass(/prompt='Password: '/, /stream=None/)¶ 
<http://docs.python.org/py3k/library/getpass.html?highlight=getpass#getpass.getpass>

    Prompt the user for a password without echoing. The user is prompted
    using the string /prompt/, which defaults to 'Password: '.

HTH

-- 
Bob Gailer
919-636-4239
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100719/20256873/attachment.html>


More information about the Tutor mailing list