Python bottle.default_app() Examples

The following are 6 code examples of bottle.default_app(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module bottle , or try the search function .
Example #1
Source File: weblcds.py    From artisan with GNU General Public License v3.0 6 votes vote down vote up
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() 
Example #2
Source File: httpd.py    From ivre with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #3
Source File: app.py    From browsertrix with MIT License 5 votes vote down vote up
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 
Example #4
Source File: app.py    From PTVS-Samples with Apache License 2.0 5 votes vote down vote up
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() 
Example #5
Source File: photobackup.py    From server-bottle with GNU General Public License v2.0 5 votes vote down vote up
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() 
Example #6
Source File: test_wsgiserver.py    From graily with Apache License 2.0 5 votes vote down vote up
def main():
    init_log(level=logging.DEBUG)
    app = default_app()
    server = make_server(("", 8888), app)
    server.serve_forever()