From: Umair G. <re...@bu...> - 2010-07-06 17:08:03
|
New submission from Umair Ghani <uma...@gm...>: The default Python getpass library uses termios, which is a shared C library object. Jython does not recognize this file, because it uses the JDK. Attempting to import termios causes the getpass module to throw an import error, forcing the default getpass (raw_input) to be called, thusly causing the plaintext password to be displayed on-screen. In attempts to fix this issue, I instead imported java.lang.System.console, which is only available in JDK >= 1.6. (http://java.sun.com/javase/6/docs/api/java/io/Console.html#readPassword%28java.lang.String,%20java.lang.Object...%29) I'm attaching a revised getpass module (${JYTHON_HOME}/Lib/getpass.py) which utilizes this import method. ---------- components: Library files: getpass.py messages: 5874 nosy: umairghani severity: normal status: open title: getpass (unix/linux) does not work in jython 2.5.1 versions: 2.5.1 Added file: http://bugs.jython.org/file853/getpass.py _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1628> _______________________________________ |