webui.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:argparseweb 作者: nirizr 项目源码 文件源码
def app(self, dispatch, parsed):
    # Make sure we get an argh-like object here that has a dispatch object
    if dispatch is None:
      if not hasattr(self._parser, 'dispatch'):
        raise ValueError("Can't dispatch a non dispatchable parser without a dispatch method")
      dispatch = self._parser.dispatch
      parsed = False

    class WebuiPageWrapper(page.WebuiPage):
      _parser = self._parser
      _dispatch = dispatch
      _parsed = parsed

    urls = ('/', 'index')
    classes = {'index': WebuiPageWrapper}

    return web.application(urls, classes)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号