首页 > 代码库 > 代码高亮调整试验

代码高亮调整试验

 

import tornado.httpserverimport tornado.ioloopimport tornado.webimport tornado.optionsimport os.pathfrom tornado.options import define, optionsdefine("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()

代码高亮调整试验