strange problem with os.getlogin
Michele Simionato
michele.simionato at gmail.com
Mon Sep 20 10:07:19 EDT 2004
I am having a strange issue with os.getlogin on Mandrake 10:
$ python -c "import os; print os.getlogin()"
Traceback (most recent call last):
File "<string>", line 1, in ?
OSError: [Errno 2] No such file or directory
On another linux machine (Debian) instead it works as expected.
For the moment I am using os.popen("whoami").read() which works
but it is an hack :-(
Does anybody have an idea of the source of the problem?
Michele Simionato
More information about the Python-list
mailing list