1.简单的Tornado示例
import tornado.web import tornado.ioloop class IndexView(tornado.web.RequestHandler): def get(self): self.write("hello world!") if __name__ == "__main__": app = tornado.web.Application([ (r'/', IndexView), ]) app.listen(8000) tornado.ioloop.IOLoop.current().start()