[le dahut] > How can I get the name of a user currently connected on a windows workstation ? I mean a sort of "whoami".
<code> import getpass getpass.getuser () </code> Or <code> import win32api win32api.GetUserName () </code> Or <code> import os os.environ['USERNAME'] </code> TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32