Who is the user??

Eric Brunel eric.brunel at pragmadev.com
Wed Jul 3 12:18:16 EDT 2002


Kristian Sons wrote:
> Hi,
> 
> is there a possibility to find out, wich user startet the python-script??
> 
> Thanks a lot,
>   Kristian

Try:

import getpass
print getpass.getuser()

This should work everywhere.

HTH
-- 
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com



More information about the Python-list mailing list