def main():
options.log_to_stderr = True
options.logging = 'info'
tornado.options.parse_command_line()
# ??http server????
http_server = tornado.httpserver.HTTPServer(Application())
http_server.listen(options.port)
# ?????
tornado.locale.set_default_locale("zh_CN")
tornado.locale.load_translations(
os.path.join(os.path.dirname(__file__), "translations")
)
# ??ioloop
tornado.ioloop.IOLoop.instance().start()
评论列表
文章目录