parameters: ()
return_statement: return pwd.getpwuid(os.getuid())[0]
docstring: Get the username from the environment or password database.
  
      First try various environment variables, then the password
      database.  This works on Windows as long as USERNAME is set.
docstring_summary: Get the username from the environment or password database.
docstring_tokens: Get the username from the environment or password database .
function: def getuser():
      """Get the username from the environment or password database.
  
      First try various environment variables, then the password
      database.  This works on Windows as long as USERNAME is set.
  
      """
  
      for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
          user = os.environ.get(name)
          if user:
              return user
  
      # If this fails, the exception will "explain" why
      import pwd
      return pwd.getpwuid(os.getuid())[0]
function_tokens: def getuser ( ) : for name in ( 'LOGNAME' , 'USER' , 'LNAME' , 'USERNAME' ) : user = os . environ . get ( name ) if user : return user # If this fails, the exception will "explain" why import pwd return pwd . getpwuid ( os . getuid ( ) ) [ 0 ]