标签:style http io ar os sp on div art
import tornado.httpserver import tornado.ioloop import tornado.web import tornado.options import os.path from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler): def get(self): self.write("your current ip is: "+self.request.remote_ip) if __name__ == "__main__": application = tornado.web.Application([(r"/", MainHandler)], debug = True) http_server = tornado.httpserver.HTTPServer(application, xheaders=True) http_server.listen(options.port) tornado.ioloop.IOLoop.instance().start()
标签:style http io ar os sp on div art
原文地址:http://www.cnblogs.com/DingCao/p/4122282.html