def _handlers(module_name):
 handlers_module = try_import(('%s.handlers' % module_name))
 if (handlers_module is None):
  return []
 if (not hasattr(handlers_module, '__path__')):
  raise HandlerError(('Module %s must be a directory.' % handlers_module.__name__))
 files = find_python_files(handlers_module.__path__[0])
 module_names = [('%s.%s' % (handlers_module.__name__, file)) for file in files]
 modules = [try_import(mod_name) for mod_name in module_names]
 return [get_class(mod, BaseHandler) for mod in modules if mod]

def _handlers ( module_name ) : handlers_module = try_import ( ( '%s.handlers' % module_name ) ) if ( handlers_module is None ) : return [ ] if ( not hasattr ( handlers_module , '__path__' ) ) : raise HandlerError ( ( 'Module %s must be a directory.' % handlers_module . __name__ ) ) files = find_python_files ( handlers_module . __path__ [ 0 ] ) module_names = [ ( '%s.%s' % ( handlers_module . __name__ , file ) ) for file in files ] modules = [ try_import ( mod_name ) for mod_name in module_names ] return [ get_class ( mod , BaseHandler ) for mod in modules if mod ]
return a list of handlers defined in the handlers directory of module_name .