KodiServer.py 文件源码

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

项目:xbmctopython 作者: pybquillast 项目源码 文件源码
def runServer(kodi = '', kodi_home = '', startBrowser=False):
    importer = ksi.KodiScriptImporter(kodi, kodi_home)
    importer.install(True)
    kodiSrv = KodiServer(importer)
    wsgiApp = partial(application, server=kodiSrv)

    server_address = ('localhost', 5000)
    httpd = make_server(
        server_address[0],  # The host name
        server_address[1],  # A port number where to wait for the request
        wsgiApp  # The application object name, in this case a function
    )
    srvThread = threading.Thread(target=httpd.serve_forever)
    if startBrowser:
        webbrowser.open('http://{}:{}'.format(*server_address))
    srvThread.start()
    return httpd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号