
pip install tornadoIf you don't have Pypi installed, then you can install it from sources:
python set.py installThis will install Tornado in your Python repos so you can now simply import it into your scripts. Now to cover some simple usages.
import tornado.httpserver
import tornado.ioloopTo make this easy on us we will define a main() function:
def main(port = 8888):The magic inside is what makes this work.
def main(port = 8888):
class InfoHandler(tornado.web.RequestHandler):
def SysInfo():
if __name__ == "__main__":