def system_resolvers(system=None):
 if (system is None):
  if stem.util.system.is_gentoo():
   system = 'Gentoo'
  else:
   system = platform.system()
 if (system == 'Windows'):
  resolvers = [Resolver.NETSTAT_WINDOWS]
 elif (system in ('Darwin', 'OpenBSD')):
  resolvers = [Resolver.LSOF]
 elif (system == 'FreeBSD'):
  resolvers = [Resolver.BSD_SOCKSTAT, Resolver.BSD_PROCSTAT, Resolver.LSOF]
 else:
  resolvers = [Resolver.NETSTAT, Resolver.SOCKSTAT, Resolver.LSOF, Resolver.SS]
 resolvers = [r for r in resolvers if stem.util.system.is_available(RESOLVER_COMMAND[r])]
 if (stem.util.proc.is_available() and os.access('/proc/net/tcp', os.R_OK) and os.access('/proc/net/udp', os.R_OK)):
  resolvers = ([Resolver.PROC] + resolvers)
 return resolvers

def system_resolvers ( system = None ) : if ( system is None ) : if stem . util . system . is_gentoo ( ) : system = 'Gentoo' else : system = platform . system ( ) if ( system == 'Windows' ) : resolvers = [ Resolver . NETSTAT_WINDOWS ] elif ( system in ( 'Darwin' , 'OpenBSD' ) ) : resolvers = [ Resolver . LSOF ] elif ( system == 'FreeBSD' ) : resolvers = [ Resolver . BSD_SOCKSTAT , Resolver . BSD_PROCSTAT , Resolver . LSOF ] else : resolvers = [ Resolver . NETSTAT , Resolver . SOCKSTAT , Resolver . LSOF , Resolver . SS ] resolvers = [ r for r in resolvers if stem . util . system . is_available ( RESOLVER_COMMAND [ r ] ) ] if ( stem . util . proc . is_available ( ) and os . access ( '/proc/net/tcp' , os . R_OK ) and os . access ( '/proc/net/udp' , os . R_OK ) ) : resolvers = ( [ Resolver . PROC ] + resolvers ) return resolvers
provides the types of connection resolvers likely to be available on this platform .