Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16939

Obtaining user information

Date 2011-12-09 19:44 -0600
From Tim Chase <python.list@tim.thechases.com>
Subject Obtaining user information
Newsgroups comp.lang.python
Message-ID <mailman.3486.1323481498.27778.python-list@python.org> (permalink)

Show all headers | View raw


Currently I can get the currently-logged-in-userid via 
getpass.getuser() which would yield something like "tchase".

Is there a cross-platform way to get the full username (such as 
from the GECOS field of /etc/passed or via something like 
NetUserGetInfo on Win32 so I'd get "Tim Chase" instead?

Thanks,

-tkc



Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Obtaining user information Tim Chase <python.list@tim.thechases.com> - 2011-12-09 19:44 -0600
  Re: Obtaining user information Hans Mulder <hansmu@xs4all.nl> - 2011-12-10 08:43 +0100
    Re: Obtaining user information Cameron Simpson <cs@zip.com.au> - 2011-12-10 18:59 +1100

csiph-web