[Tutor] Help with hangman
alan.gauld at btinternet.com
Mon Jul 19 20:00:55 CEST 2010
"John Palmer" <speederpython at gmail.com> wrote
Modifying the subject...
And I repeat, please don't send the whole digest,
delete the excess irrelevant stuff! (see below!)
> Thanks a lot for the help guys, but when I use the
> your word here, I get a different response to what you get. This is
> happen with mine:
>>>> import getpass
>>>> s = getpass.getpass("Enter your word here: ")
> Warning: Password input may be echoed.
> Please enter your secret word: hangman
> I'm guessing that its something to do with the "Warning: Password
> may be
> echoed" line. In the documentation it says:
> "If echo free input is unavailable getpass() falls back to printing
> warning message to stream and reading
> from sys.stdin and issuing a GetPassWarning."
What OS and terminal are you using?
It may be possible to enable echo free input...
Author of the Learn to Program web site
More information about the Tutor