Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tornado - AutoReload - Watch
import tornado.web
import tornado.autoreload
class Main(tornado.web.RequestHandler):
def get(self):
self.write('Main')
application = tornado.web.Application([
(r"/", Main)
])
if __name__ == '__main__':
application.listen(8000)
print "Watching file watch..."
tornado.autoreload.watch('watch')
tornado.autoreload.wait()
tornado.ioloop.IOLoop.instance().start()
File being watched..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment