解释说明
https://blog.csdn.net/zhangliang_571/article/details/23508953
http://www.cnblogs.com/biyeymyhjob/archive/2012/07/28/2612910.html
使用tornado写一个简单的web
# -*- coding:utf-8 -*- import tornado.ioloop import tornado.web settings = { 'template_path': 'template', # html文件夹 } class MainHandler(tornado.web.RequestHandler): def get(self): self.render("index.html") def post(self): print(self.get_argument("username",None)) print(self.get_arguments("hobby")) self.write("post success") application = tornado.web.Application([ (r"/index", MainHandler), ],**settings) if __name__ == "__main__": print('http://127.0.0.1:8888') application.listen(8888) tornado.ioloop.IOLoop.instance().start()