parameters: ()
return_statement: return retlist
docstring: Return currently connected users as a list of namedtuples.
docstring_summary: Return currently connected users as a list of namedtuples.
docstring_tokens: Return currently connected users as a list of namedtuples .
function: def users():
      """Return currently connected users as a list of namedtuples."""
      retlist = []
      rawlist = cext.users()
      localhost = (':0.0', ':0')
      for item in rawlist:
          user, tty, hostname, tstamp, user_process = item
          # note: the underlying C function includes entries about
          # system boot, run level and others.  We might want
          # to use them in the future.
          if not user_process:
              continue
          if hostname in localhost:
              hostname = 'localhost'
          nt = _common.suser(user, tty, hostname, tstamp)
          retlist.append(nt)
      return retlist
function_tokens: def users ( ) : retlist = [ ] rawlist = cext . users ( ) localhost = ( ':0.0' , ':0' ) for item in rawlist : user , tty , hostname , tstamp , user_process = item # note: the underlying C function includes entries about # system boot, run level and others.  We might want # to use them in the future. if not user_process : continue if hostname in localhost : hostname = 'localhost' nt = _common . suser ( user , tty , hostname , tstamp ) retlist . append ( nt ) return retlist