def username():
 global _username
 if (not _username):
  uid = os.getuid()
  _username = (pwd_from_uid(uid)[0] or ('user%d' % uid))
 return _username

def username ( ) : global _username if ( not _username ) : uid = os . getuid ( ) _username = ( pwd_from_uid ( uid ) [ 0 ] or ( 'user%d' % uid ) ) return _username
check that the username leads to an existing player .