def users():
 retlist = []
 rawlist = cext.users()
 localhost = (':0.0', ':0')
 for item in rawlist:
  (user, tty, hostname, tstamp, user_process) = item
  if (not user_process):
   continue
  if (hostname in localhost):
   hostname = 'localhost'
  nt = _common.suser(user, tty, hostname, tstamp)
  retlist.append(nt)
 return retlist

def users ( ) : retlist = [ ] rawlist = cext . users ( ) localhost = ( ':0.0' , ':0' ) for item in rawlist : ( user , tty , hostname , tstamp , user_process ) = item if ( not user_process ) : continue if ( hostname in localhost ) : hostname = 'localhost' nt = _common . suser ( user , tty , hostname , tstamp ) retlist . append ( nt ) return retlist
return currently connected users as a list of namedtuples .