Message10452
I'm currently running Python 2.2.1 on a Windows 98
box, and this is the code I have just run.
-------
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for
more information.
>>> import getpass
>>> def x():
... secret = getpass.getpass('Tell me a secret: ')
... stuff = raw_input ('Tell me something else: ')
... print 'The user told me the secret was "%s" and
the other thing was "%s"'
% (secret, stuff)
...
>>> x()
Tell me a secret:
Tell me something else:
The user told me the secret was "Autechre" and the
other thing was ""
>>>
-------
This may seem normal, but I didn't get the opportunity
to enter anything when the raw_input was called. I'm
assuming that getpass leaves the newline character in
the input buffer, which is then used by raw_input,
leaving you unable to enter anything. |
|
Date |
User |
Action |
Args |
2007-08-23 14:00:48 | admin | link | issue546558 messages |
2007-08-23 14:00:48 | admin | create | |
|