problems with getpass.getpass() under Linux

Chris Gonnerman chris.gonnerman at
Fri Sep 13 00:38:01 EDT 2002

----- Original Message -----
From: "DG" <david at>

> Greetings,
> I have Slackware Linux 8.0 with the (as distributed) Python 2.0.1
> When I import getpass and try to getpass.getpass() I get the following
> and the password is echoed:
> "Warning: Problem with getpass. Passwords may be echoed."
> Looking into it does this:
> try:
>         import termios, TERMIOS
> If that fails, it goes on to try to import Windows and then Mac-specific
> modules, with a fallback to just calling raw_input (effectively).
> I have in /usr/lib/python2.0/plat-linux2 but I do not have
> anywhere.

That's because it is; it should be in

> I have the Python 2.2.1 tarball (not (yet) installed), it contains
> and but not (altho it does have a termios.c).  I
> notice that the 2.2.1 only tries to import termios.
> What do I need to do to have getpass.getpass() work correctly?

If you build the 2.2.1 system it should make the module for you;
I'd think that would work fine.

Chris Gonnerman -- chris.gonnerman at

More information about the Python-list mailing list