Tag Archives: tornado

Day 1 – meet Tornado

Environmental Science

LSB release-a–

Ubuntu 12.04

Python 2.7.3

(2) In the territory of a member state, in the territory of a member state, in the territory of a member state, in the territory of a member state, in the territory of a member state, in the territory of a member state, in the territory of a member state,

(1) At a specific point in time

Sudo apt get install pip

Installation of tornado

4.2.1

(1) In a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state of a member state.

One

#coding=utf-8
importtornado.ioloop
importtornado.web

classMainHandler(tornado.web.RequestHandler):
defget(self):
self.write("hello,world")

application=tornado.web.Application([
(r"/",MainHandler),
])

if__name__=="__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()

Run the program python.py

Now go to the browser and type the address http://127.0.0.1 : 8888 /, you will see that the page returns to Hello, world, indicating that the program starts successfully.

A warning will pop up in the shell:

WARNING:tornado.access :404 GET/favicon.ico (127.0.0.1) 0.41ms

This problem remains to be solved