def _getInstallFunction(platform):
 try:
  if platform.isLinux():
   try:
    from twisted.internet.epollreactor import install
   except ImportError:
    from twisted.internet.pollreactor import install
  elif ((platform.getType() == 'posix') and (not platform.isMacOSX())):
   from twisted.internet.pollreactor import install
  else:
   from twisted.internet.selectreactor import install
 except ImportError:
  from twisted.internet.selectreactor import install
 return install

def _getInstallFunction ( platform ) : try : if platform . isLinux ( ) : try : from twisted . internet . epollreactor import install except ImportError : from twisted . internet . pollreactor import install elif ( ( platform . getType ( ) == 'posix' ) and ( not platform . isMacOSX ( ) ) ) : from twisted . internet . pollreactor import install else : from twisted . internet . selectreactor import install except ImportError : from twisted . internet . selectreactor import install return install
return a function to install the reactor most suited for the given platform .