[Q]: How can I get the logged in users username on Win32?

nomad nomad*** at ***freemail.absa.co.za
Fri Mar 2 02:56:06 EST 2001


Howzit,

After searching through the Python Docs, I found that on Un*x I could
use getpass.getuser(), but there is no equivalent for the Win32
platform.

In other words, how can I get the username in Windows?

As a side note, how can I enable Windows Scripting Host support for
python - there is mention of python in the original WSH docs - and if
I can use python scripts in WSH how would I call the built-in
Wscript.<methods>

TIA

nomad



More information about the Python-list mailing list