On Mon, Jul 19, 2010 at 11:20 AM, John Palmer <speederpyt...@gmail.com>wrote:

> Thanks a lot for the help guys, but when I use the getpass.getpass(Enter
> your word here, I get a different response to what you get. This is what
> happen with mine:
>
> >>> import getpass
> >>> s = getpass.getpass("Enter your word here: ")
> Warning: Password input may be echoed.
> Please enter your secret word: hangman
>
> >>> s
> '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 a
> warning message to stream and reading
> from sys.stdin and issuing a GetPassWarning."
> <snip copious amounts of irrelevant reply data>


What terminal emulator are you using? Whatever it is, apparently it doesn't
offer the ability to turn off echoing - or at least it doesn't report such
things. Though AFAIK, xterm, Eterm, and gnome-terminal all are fine with
that.

-Wayne
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to