本文整理汇总了Python中tornado.web.Application.use_plim方法的典型用法代码示例。如果您正苦于以下问题:Python Application.use_plim方法的具体用法?Python Application.use_plim怎么用?Python Application.use_plim使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tornado.web.Application
的用法示例。
在下文中一共展示了Application.use_plim方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init_server
# 需要导入模块: from tornado.web import Application [as 别名]
# 或者: from tornado.web.Application import use_plim [as 别名]
def init_server(runner_, port, use_plim, static_file_dir):
global app, runner
settings = dict(
debug=True,
# autoreload=True,
)
app = Application([
(r'/', IndexHandler),
(r'/start/', StartHandler),
(r'/stop/', StopHandler),
(r'/messages/', MessageHandler),
(r'.*/quipclient.py$', QuipClientHandler),
(r'/(.*\.pyj)$', PyJHandler),
(r'/(.*\.styl)$', StylusHandler),
(r'/(.*)', NoCacheStaticFileHandler),
], **settings)
runner = runner_
app.sockets = set()
app.use_plim = use_plim
app.static_file_dir = static_file_dir
app.listen(port)
# Return the sockets so that the runner can use them.
return app.sockets