@@ -0,0 +1,1184 @@
+#!/usr/bin/python%0A%0A# Launch a very light-HTTP server: Tornado%0A#%0A# Requirements (import from):%0A#   -  tornado%0A#%0A# Syntax:%0A#   ./start.py %3Cport=8080%3E%0A%0Aimport tornado.ioloop%0Aimport tornado.web%0A%0Aimport sys%0Afrom os import path%0A#sys.path.append(path.join(path.dirname(__file__), %22../scripts/%22))%0A#from generate_db import DEFAULT_DB%0A%0Aclass MainHandler(tornado.web.RequestHandler):%0A    def get(self):%0A        self.write(%22Hello World %5E%5E%22)%0A%0Aif __name__ == %22__main__%22:%0A    if len(sys.argv) != 1 and len(sys.argv) != 2:%0A        print('''Syntax: ./start.py %3Cport=8080%3E''')%0A        exit(1)%0A    %0A    try:%0A        if (len(sys.argv) == 2):%0A            port = int(sys.argv%5B1%5D)%0A        else:%0A            port = 8080%0A    except ValueError, e:%0A        print('''ERROR: %7B%7D'''.format(e))%0A        print('''Syntax: ./start.py %3Cport=8080%3E''')%0A        exit(2)%0A    except TypeError, e:%0A        print('''ERROR: %7B%7D'''.format(e))%0A        print('''Syntax: ./start.py %3Cport=8080%3E''')%0A        exit(3)%0A    %0A    # Define server parameters%0A    application = tornado.web.Application(%5B%0A        (r%22/%22, MainHandler),%0A    %5D)%0A    application.listen(port)%0A    %0A    # Start the server%0A    tornado.ioloop.IOLoop.instance().start()%0A%0A

Tornado HTTP Server: Hello World