def add_ui_controllers(webapp, app):
 from galaxy.web.base.controller import BaseUIController
 import galaxy.webapps.reports.controllers
 controller_dir = galaxy.webapps.reports.controllers.__path__[0]
 for fname in os.listdir(controller_dir):
  if ((not fname.startswith('_')) and fname.endswith('.py')):
   name = fname[:(-3)]
   module_name = ('galaxy.webapps.reports.controllers.' + name)
   module = __import__(module_name)
   for comp in module_name.split('.')[1:]:
    module = getattr(module, comp)
   for key in dir(module):
    T = getattr(module, key)
    if (isclass(T) and (T is not BaseUIController) and issubclass(T, BaseUIController)):
     webapp.add_ui_controller(name, T(app))

def add_ui_controllers ( webapp , app ) : from galaxy . web . base . controller import BaseUIController import galaxy . webapps . reports . controllers controller_dir = galaxy . webapps . reports . controllers . __path__ [ 0 ] for fname in os . listdir ( controller_dir ) : if ( ( not fname . startswith ( '_' ) ) and fname . endswith ( '.py' ) ) : name = fname [ : ( - 3 ) ] module_name = ( 'galaxy.webapps.reports.controllers.' + name ) module = __import__ ( module_name ) for comp in module_name . split ( '.' ) [ 1 : ] : module = getattr ( module , comp ) for key in dir ( module ) : T = getattr ( module , key ) if ( isclass ( T ) and ( T is not BaseUIController ) and issubclass ( T , BaseUIController ) ) : webapp . add_ui_controller ( name , T ( app ) )
search for controllers in the galaxy .