tornado 初识

Tornado

import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")

application = tornado.web.Application([
(r"/", MainHandler),
])

if __name__ == "__main__":
application.listen(80) 
tornado.ioloop.IOLoop.instance().start()

posted @ 2018-07-18 19:45  芒果先生丶  阅读(75)  评论(0编辑  收藏  举报