In [ ]:
import tornado.ioloop
import tornado.web

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

def make_app():
    return tornado.web.Application([
        (r"/", MainHandler),
    ])

if __name__ == "__main__":
    app = make_app()
    app.listen(8889)
    tornado.ioloop.IOLoop.current().start()
In [7]:
io = tornado.ioloop.IOLoop.current()
Out[7]:
<bound method Configurable.configure of <class 'zmq.eventloop.ioloop.ZMQIOLoop'>>
In [8]:
class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")

def make_app():
    return tornado.web.Application([
        (r"/hello", MainHandler),
    ])