示例
HelloTornado.py
# _*_coding:utf-8_*_
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, Tornado")
class Handler_index(tornado.web.RequestHandler):
def get(self):
self.render("index.html")
settings = {
"template_path": "template",
"static_path": "static"
}
application = tornado.web.App