Yes, getpass.getuser() seems to work fine on XP, too. If it doesn't work on another version of Windows, this might do the trick: >>> from win32com import Dispatch >>> net = Dispatch('WScript.network') >>> net.Username u'Monty'