March 2003
Intermediate to advanced
656 pages
39h 30m
English
getuser
getuser( )
Returns the current user’s username. First,
getuser tries to get the username as the value of
one of environment variables LOGNAME,
USER, LNAME, and
USERNAME, in this order. If none of these
variables are keys in os.environ,
getuser tries asking the operating system for the
username.