problems with getpass.getpass() under Linux

DG david at
Fri Sep 13 06:05:36 CEST 2002


I have Slackware Linux 8.0 with the (as distributed) Python 2.0.1 installed.
When I import getpass and try to getpass.getpass() I get the following error
and the password is echoed:

"Warning: Problem with getpass. Passwords may be echoed."

Looking into it does this:

        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.

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?



More information about the Python-list mailing list