This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
DUT2PTUT/superTornado.py

33 lines
813 B
Python
Raw Normal View History

2014-02-27 14:43:58 +00:00
import tornado.ioloop
import tornado.web
2014-02-27 15:55:33 +00:00
import tornado.httpserver
2014-02-27 14:43:58 +00:00
2014-02-27 18:55:43 +00:00
confAveug = False
2014-02-27 15:06:38 +00:00
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.render("index.html")
def post(self):
2014-02-27 17:43:55 +00:00
iden = self.get_argument("id","")
mdp = self.get_argument("mdp","")
2014-02-27 17:47:34 +00:00
self.write("Le pseudo est :")
self.write(iden)
2014-02-27 16:56:39 +00:00
2014-02-27 14:43:58 +00:00
2014-02-27 15:06:38 +00:00
application = tornado.web.Application([
(r"/", MainHandler),
])
2014-02-27 14:43:58 +00:00
2014-02-27 14:51:19 +00:00
if __name__ == "__main__":
2014-02-27 18:55:43 +00:00
#chargement congig
confAveug = hand.estAveugle()
if confAveug == True:
print "->Blind unhabitant system configuration"
else :
print "->Not blind unhabitant system configuration"
2014-02-27 15:56:43 +00:00
http_server = tornado.httpserver.HTTPServer(application)
2014-02-27 15:53:58 +00:00
http_server.listen(80)
2014-02-27 15:06:38 +00:00
tornado.ioloop.IOLoop.instance().start()