Message7521

Author JoshDavisNC
Recipients JoshDavisNC
Date 2012-11-14.23:50:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352937037.73.0.452898362697.issue1987@psf.upfronthosting.co.za>
In-reply-to
Content
I have a Jython script that calls into some Java classes.  One of these classes asks the user for a username and password using the java.lang.System.console().readLine() and .readPassword() API's.  When this class is used in a Java environment without Jython, those API's work correctly.  In my Jython environment, these API's only read a single character.  I can duplicate this behavior in the interactive console like this:

>>> from java.lang import System
>>> username = System.console().readLine("Username: ")
Username: >>>
>>> username
u'j'
>>> password = System.console().readPassword("Password: ")
Password: >>>
>>> password
array('c', 'p')
History
Date User Action Args
2012-11-14 23:50:37JoshDavisNCsetmessageid: <1352937037.73.0.452898362697.issue1987@psf.upfronthosting.co.za>
2012-11-14 23:50:37JoshDavisNCsetrecipients: + JoshDavisNC
2012-11-14 23:50:37JoshDavisNClinkissue1987 messages
2012-11-14 23:50:37JoshDavisNCcreate