flask based on tornado

from flask import Flask
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop app = Flask(__name__) @app.route("/")
def hello():
  return "Hello World!" if __name__ == "__main__":
  http_server=HTTPServer(WSGIContainer(app))
  http_server.listen(8000)
  IOLoop.instance().start()

  

  

上一篇:转:仿QQ长按弹出功能菜单


下一篇:大爽Python入门教程 4-2 函数返回值 return