def _GetUsername(self):
    try:
      return os.getenv('USER') or \
             os.getenv('LOGNAME') or \
             os.getenv('USERNAME') or \
             os.getlogin() or \
             'nobody'
    except (IOError, OSError), e:
      return 'nobody'
Attempt to find the username in a cross-platform fashion.
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/_FileCache._GetUsername