当前位置: 首页>>代码示例>>Python>>正文


Python bottle.default_app方法代码示例

本文整理汇总了Python中bottle.default_app方法的典型用法代码示例。如果您正苦于以下问题:Python bottle.default_app方法的具体用法?Python bottle.default_app怎么用?Python bottle.default_app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bottle的用法示例。


在下文中一共展示了bottle.default_app方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: work

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def work(p,rp,nonesym,timec,timebg,btc,btbg,etc,etbg,showetflag,showbtflag):
    global port, static_path, nonesymbol, timecolor, timebackground, btcolor, btbackground, etcolor, etbackground, showbt, showet
    port = p
    static_path = rp
    nonesymbol = nonesym
    timecolor = timec
    timebackground = timebg
    btcolor = btc
    btbackground = btbg
    etcolor = etc
    etbackground = etbg
    showet = showetflag
    showbt = showbtflag
    TEMPLATE_PATH.insert(0,rp)
    s = WSGIServer(("0.0.0.0", p), default_app(), handler_class=WebSocketHandler)
    s.serve_forever() 
开发者ID:artisan-roaster-scope,项目名称:artisan,代码行数:18,代码来源:weblcds.py

示例2: main

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def main():
    """Function run when the tool is called."""
    args = parse_args()
    print(__doc__)
    application = default_app()
    application.mount('/cgi/', webapp.application)
    run(host=args.bind_address, port=args.port, debug=DEBUG) 
开发者ID:cea-sec,项目名称:ivre,代码行数:9,代码来源:httpd.py

示例3: init

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def init():
    """ Init the application and add routes """

    logging.basicConfig(format='%(asctime)s: [%(levelname)s]: %(message)s',
                        level=logging.DEBUG)

    global theconfig
    theconfig = get_config()

    global rc
    rc = init_redis(theconfig)

    app = default_app()

    return app 
开发者ID:ikreymer,项目名称:browsertrix,代码行数:17,代码来源:app.py

示例4: wsgi_app

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def wsgi_app():
    """Returns the application to make available through wfastcgi. This is used
    when the site is published to Microsoft Azure."""
    return bottle.default_app() 
开发者ID:microsoft,项目名称:PTVS-Samples,代码行数:6,代码来源:app.py

示例5: main

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def main():
    """ Prepares and launches the bottle app. """
    if (arguments['init']):
        init_config(arguments['<username>'])
    elif (arguments['run']):
        app = bottle.default_app()
        if 'HTTPPrefix' in config:
            app.mount(config['HTTPPrefix'], app)
        app.run(port=config['Port'], host=config['BindAddress'])
    elif (arguments['list']):
        print_list() 
开发者ID:PhotoBackup,项目名称:server-bottle,代码行数:13,代码来源:photobackup.py

示例6: main

# 需要导入模块: import bottle [as 别名]
# 或者: from bottle import default_app [as 别名]
def main():
    init_log(level=logging.DEBUG)
    app = default_app()
    server = make_server(("", 8888), app)
    server.serve_forever() 
开发者ID:lazywen,项目名称:graily,代码行数:7,代码来源:test_wsgiserver.py


注:本文中的bottle.default_app方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。