若是用于web访问,选择python-web。 其余,可选python-worker。python
import tornado.wsgi import tornado.web class MainHandler(tornado.web.RequestHandler): def __init__ (self): self.write( " Welcome to Tornado website. " ) app = tornado.wsgi.WSGIApplication([ (r " / " , MainHandler), ]) from bae.core.wsgi import WSGIApplication application = WSGIApplication(app)