__init__.py 文件源码

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

项目:Polyglot 作者: UniversalDevicesInc 项目源码 文件源码
def load(pglot, user_config):
    ''' setup the http server '''
    # pylint: disable=global-statement, unused-argument
    global SERVER, _THREAD

    # set configuration
    config = DEFAULT_CONFIG
    config.update(user_config)
    set_config(config)

    # create server
    SERVER = tornado.web.Application([], {})
    SERVER.listen(PORT)


    # run server on a thread
    _THREAD = threading.Thread(target=run_server)
    _THREAD.daemon = True
    _THREAD.start()
    _LOGGER.info('Started HTTP server on port %d', PORT)

    _LOGGER.info('Loaded HTTP element')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号