Message7521
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') |
|
Date |
User |
Action |
Args |
2012-11-14 23:50:37 | JoshDavisNC | set | messageid: <1352937037.73.0.452898362697.issue1987@psf.upfronthosting.co.za> |
2012-11-14 23:50:37 | JoshDavisNC | set | recipients:
+ JoshDavisNC |
2012-11-14 23:50:37 | JoshDavisNC | link | issue1987 messages |
2012-11-14 23:50:37 | JoshDavisNC | create | |
|