I use this function as a platform-independent way of finding out the
current user name:

def get_username():
    if sys.platform == 'win32':
        return win32api.GetUserName()
    else:
        return getpass.getuser()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to