龙卷风应用程序在启动后结束

时间:2014-07-14 11:08:29

标签: python tornado

我想开始我的龙卷风hello world应用程序。我已经从龙卷风网站上复制了这段代码:

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(8888)
    tornado.ioloop.IOLoop.instance().start()

当我尝试在pycharm中运行它时,会显示一条消息:

Process finished with exit code 0

问题是什么?

0 个答案:

没有答案