Skip to content

Instantly share code, notes, and snippets.

@abdelouahabb
Last active August 29, 2015 14:04
Show Gist options
  • Save abdelouahabb/69a3ccad272e8aa56c94 to your computer and use it in GitHub Desktop.
Save abdelouahabb/69a3ccad272e8aa56c94 to your computer and use it in GitHub Desktop.
#coding: utf-8
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
class UnicodeHandler(tornado.web.RequestHandler):
def get(self):
self.write("This is some french")
application = tornado.web.Application([
(r"/", MainHandler),
(r"/oé", UnicodeHandler),
])
if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment