problems with getpass.getpass() under Linux
Chris Gonnerman
chris.gonnerman at newcenturycomputers.net
Fri Sep 13 00:38:01 EDT 2002
----- Original Message -----
From: "DG" <david at fielden.com.au>
> Greetings,
>
> 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 getpass.py 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 TERMIOS.py in /usr/lib/python2.0/plat-linux2 but I do not have
> termios.py anywhere.
That's because it is termios.so; it should be in
/usr/lib/python2.0/lib-dynload.
> I have the Python 2.2.1 tarball (not (yet) installed), it contains
> TERMIOS.py and but not termios.py (altho it does have a termios.c). I
> notice that the 2.2.1 getpass.py 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 termios.so module for you;
I'd think that would work fine.
Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net
More information about the Python-list
mailing list