silent raw_input for passwords

Heather Coppersmith me at privacy.net
Fri Apr 30 23:13:23 EDT 2004


On Fri, 30 Apr 2004 21:26:40 -0500,
Stephen Boulet <stephen.no at spam.theboulets.net.please> wrote:

> I need a password for a script and I would like to not have it
> stored in a file or shown in a terminal.

> "passphrase = raw_input()" still lets you see the input on the
> screen. Is there a way to have it be hidden? It's my gpg
> passphrase, so I don't want it anywhere except in my head.

See the getpass module; it's part of the standard library.

Most GUI's have similar functionality.

HTH,,
Heather

-- 
Heather Coppersmith
That's not right; that's not even wrong. -- Wolfgang Pauli



More information about the Python-list mailing list