def _get_system_username():
 import getpass
 username = None
 try:
  username = getpass.getuser()
 except KeyError:
  pass
 except ImportError:
  if win32:
   import win32api
   import win32security
   import win32profile
   username = win32api.GetUserName()
 return username

def _get_system_username ( ) : import getpass username = None try : username = getpass . getuser ( ) except KeyError : pass except ImportError : if win32 : import win32api import win32security import win32profile username = win32api . GetUserName ( ) return username
obtain name of current system user .