[Python-bugs-list] [ python-Bugs-546558 ] Windows getpass bug

noreply@sourceforge.net noreply@sourceforge.net
Sat, 20 Apr 2002 11:34:10 -0700


Bugs item #546558, was opened at 2002-04-20 18:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546558&group_id=5470

Category: Windows
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Allan Crooks (amc1)
Assigned to: Tim Peters (tim_one)
Summary: Windows getpass bug

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546558&group_id=5470