标签:col div tor 继承 hand ica get web __name__
tornado的第一个程序
1 import tornado.ioloop 2 import tornado.web 3 4 5 class Index(tornado.web.RequestHandler): 6 def get(self): 7 self.write(‘Hello World!‘) 8 9 10 application = tornado.web.Application( 11 handlers=[ 12 (r‘/‘, Index), # 路由和对应视图类 13 ] 14 ) 15 16 if __name__ == ‘__main__‘: 17 application.listen(80) # 监听端口 18 tornado.ioloop.IOLoop.current().start()
标签:col div tor 继承 hand ica get web __name__
原文地址:https://www.cnblogs.com/ivy-blogs/p/10765796.html