[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: how to find current working user

Gabriel Genellina

2/11/2008 6:30:00 PM

En Mon, 11 Feb 2008 15:21:16 -0200, Praveena Boppudi (c)
<pboppudi@vmware.com> escribi�:

> Can anyone tell me how to find current working user in windows?

If it is just informational, use os.environ['USERNAME']
Using win32wnet (from the pywin32 package):

py> import win32wnet
py> win32wnet.WNetGetUser()
'gabriel'

--
Gabriel Genellina