Prompting for password on the command line

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Prompting for password on the command line

Chuck Bearden
Hi all,

Using Jython 2.7b3.

I know that getpass.getpass() is to be avoided because it echoes the
password entered. I tried to use the Java console in the following

    from java.lang import System
    cons = System.console()
    pass = cons.readPassword()

but only one character is read and the program continues.

Is there a correct, secure way to prompt a user for a password from a
program running on the command line?


Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
Jython-users mailing list
[hidden email]