From: Philip J. <pj...@un...> - 2009-06-26 20:26:44
|
On Jun 26, 2009, at 1:05 PM, Mark Gruman wrote: > I recently downloaded Jython 2.5 (we were on 2.1 for the longest > time) and was pleasantly surprised to find the inclusion of Python’s > getpass module. When I try to utilize this module, however, I get > the ”Warning: Problem with getpass. Passwords may be echoed.“ > error. I believe that this is happening because a native dll > library is not getting loaded properly. I think that when one > installs Python, the msvcr7.dll (I’m using Windows XP) library gets > installed and automagically linked, but this does not appear to be > the case with Jython. Thus, how do I get getpass to work with > Jython 2.5 (assuming that Python is not available)? Providing the msvcrt module used by getpass in Jython would be more involved than just installing a dll, we would need a JNA interface to its API. And of course POSIX handles getpass differently. However Java 6's java.io.Console does provide a safe password reader, so implementing a java_getpass with it would be the simplest solution. We may require Java 6 for Jython 2.6, but regardless this could be included in 2.5.1 with a fallback to the unsafe version on Java 5. It should be a fairly simple addition to getpass.py if you want to take a crack at it. -- Philip Jenvey |