User Identification
Laszlo Zsolt Nagy
gandalf at geochemsource.com
Tue Feb 8 07:42:32 EST 2005
Bob Parnes wrote:
>I have a python program on a server of an all-linux network. It needs to
>record the user name running it. Is there a way for the program to extract
>the name from the system without a separate log-in dialog?
>
>Bob Parnes
>
>
>
What about:
import os
username = os.getlogin()
Please see other functions at:
http://docs.python.org/lib/os-procinfo.html
Best,
Laci 2.0
--
_________________________________________________________________
Laszlo Nagy web: http://designasign.biz
IT Consultant mail: gandalf at geochemsource.com
Python forever!
More information about the Python-list
mailing list