

def _load_ui_methods(self, methods):
    if isinstance(methods, types.ModuleType):
        self._load_ui_methods(dict(((n, getattr(methods, n)) for n in dir(methods))))
    elif isinstance(methods, list):
        for m in methods:
            self._load_ui_methods(m)
    else:
        for (name, fn) in methods.items():
            if ((not name.startswith('_')) and hasattr(fn, '__call__') and (name[0].lower() == name[0])):
                self.ui_methods[name] = fn

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py Application._load_ui_methods/original