getpass
Jorge Godoy
godoy at metalab.unc.edu
Sat Oct 11 22:22:37 EDT 2003
"Lucas Raab" <lvraab at earthlink.net> writes:
> Could someone please demo the "getpass" module? I would like to use this,
> but have problems with it. Also, is there a way to have usernames other than
> through "pwd" (which I don't have because I have Win98).
I had the same problem you do.
You can try using os.getlogin():
>>> import os
>>> print os.getlogin()
godoy
>>>
On the other hand, the availability of the user on Win98 et al. seems
to be due to the way its auth mechanism works.
--
Godoy. <godoy at metalab.unc.edu>
More information about the Python-list
mailing list