Python tornado.options.options 模块,group_dict() 实例源码

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

项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:My-Web-Server-Framework-With-Python2.7    作者:syjsu    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.instance().start()
项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.current().start()
项目:annotated-py-tornado    作者:hhstore    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:teleport    作者:eomsoft    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:projects-2017-2    作者:ncss    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:aweasome_learning    作者:Knight-ZXW    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.current().start()
项目:aweasome_learning    作者:Knight-ZXW    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:zenchmarks    作者:squeaky-pl    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.current().start()
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:TornadoWeb    作者:VxCoder    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:PyQYT    作者:collinsctk    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:mlc    作者:valiro21    | 项目源码 | 文件源码
def make_app():
    """
    Create a Tornado app for BackendWebServer.
    """
    return tornado.web.Application([
        ("/", MainHandler),
        (r"/archive", ArchiveHandler),
        (r"/ranking", RankingHandler),
        (r"/problem/.+", ProblemHandler),
        (r"/contestlist", ContestListHandler),
        (r"/submissions", SubmissionsHandler),
        (r"/submission", SubmissionDetailsHandler),
        (r"/register", RegisterHandler),
        (r"/contest/.+", ContestHandler),
        (r"/contest/.+/problem/.+", ProblemHandler),
        (r"/user/.+", UserHandler),
        (r"/login", LoginHandler),
        (r"/logout", LogoutHandler),
        (r"/confirm/.+", UserConfirmationHandler),
        (r"/recovery/.+", RecoveryHandler)
        ],
        **options.group_dict('application'))
项目:LinuxBashShellScriptForOps    作者:DingGuodong    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.current().start()
项目:ProgrameFacil    作者:Gpzim98    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:ProgrameFacil    作者:Gpzim98    | 项目源码 | 文件源码
def main():
    parse_command_line(final=False)
    parse_config_file(options.config_file)

    app = Application(
        [
            ('/', MainHandler),
            ('/login', LoginHandler),
            ('/logout', LogoutHandler),
        ],
        login_url='/login',
        **options.group_dict('application'))
    app.listen(options.port)

    logging.info('Listening on http://localhost:%d' % options.port)
    IOLoop.current().start()
项目:ProgrameFacil    作者:Gpzim98    | 项目源码 | 文件源码
def group_dict(self, group):
        """The names and values of options in a group.

        Useful for copying options into Application settings::

            from tornado.options import define, parse_command_line, options

            define('template_path', group='application')
            define('static_path', group='application')

            parse_command_line()

            application = Application(
                handlers, **options.group_dict('application'))

        .. versionadded:: 3.1
        """
        return dict(
            (opt.name, opt.value()) for name, opt in self._options.items()
            if not group or group == opt.group_name)
项目:mlc    作者:valiro21    | 项目源码 | 文件源码
def make_app():
    """Create tornado app for AdminWebServer."""
    return tornado.web.Application(handlers,
                                   **options.group_dict('application'))