Gerhard Haering wrote:

os.getuid() will give you the user id, but I don't know if Python has methods to look up more information from that from /etc/passwd or whereever from.

>>> import pwd,os
>>> pwd.getpwuid(os.getuid())
('michael', 'x', 1234, 100, 'Michael Str\xf6der', '/home/michael', '/bin/bash')
>>>


Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to