nouveau fichier: superTornado.py

This commit is contained in:
sidya82 2014-02-27 15:43:58 +01:00
parent 187c98c575
commit 57330baf36
1 changed files with 20 additions and 0 deletions

20
superTornado.py Normal file
View File

@ -0,0 +1,20 @@
import tornado.httpserver
import tornado.ioloop
def main(port = 80):
ioloop = tornado.ioloop.IOLoop.instance()
application = tornado.web.Application([
(r"/get/(sysinfo|cpuinfo)", InfoHandler)
])
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(port)
try:
ioloop.start()
except KeyboardInterrupt:
pass