win32api.GetUserNameEx

string = GetUserNameEx(NameFormat)

Returns the current user name in format from EXTENDED_NAME_FORMAT enum

Parameters

NameFormat : int

EXTENDED_NAME_FORMAT value, win32con.Name*

Win32 API References

Search for GetUserNameEx at msdn, google or google groups.