Message6598

Author jackgene
Recipients jackgene
Date 2011-08-09.21:06:27
SpamBayes Score 1.4988011e-15
Marked as misclassified No
Message-id <1312923988.28.0.61476773782.issue1787@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, 
I've run into a problem where on Windows, the getpass.getpass() function does not behave as expected. I'm expecting it to: 
1. Prompt me for a password. 
2. Wait for me to type something in (without echoing), and press enter. 
3. Return the string I typed. 

However, the behavior I observe is that after the password prompt, the program hangs: 

Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) 
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_26 
Type "help", "copyright", "credits" or "license" for more information. 
>>> from getpass import getpass 
>>> getpass() 
Password: 

(and this point, the program hangs, and does not respond to keyboard input, not even Ctrl-C, Ctrl-D, Ctrl-Z etc) 

I've successfully replicated this behavior on Windows Vista, Windows Server 2003, and Windows Server 2008. Solaris, MacOS X and Linux does not appear to be affected. 

I've implemented the attached workaround in my environment, and it seems to work (though it's more Java than Jython).
History
Date User Action Args
2011-08-09 21:06:28jackgenesetrecipients: + jackgene
2011-08-09 21:06:28jackgenesetmessageid: <1312923988.28.0.61476773782.issue1787@psf.upfronthosting.co.za>
2011-08-09 21:06:28jackgenelinkissue1787 messages
2011-08-09 21:06:28jackgenecreate