Python tornado.web 模块,py() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用tornado.web.py()

项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def _load_ui_modules(self, modules):
        if type(modules) is types.ModuleType:
            self._load_ui_modules(dict((n, getattr(modules, n))
                                       for n in dir(modules)))
        elif isinstance(modules, list):
            for m in modules:
                self._load_ui_modules(m)
        else:
            assert isinstance(modules, dict)
            for name, cls in modules.iteritems():
                try:
                    if issubclass(cls, UIModule):
                        self.ui_modules[name] = cls
                except TypeError:
                    pass

    # ????: ??? --> ?????
    #
    # ??: ?????
    # - wsgi.py
    #   - WSGIApplication()
    #       - self.__call__() ??
    #