Tornado 6.1 Documentation
import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), Automatically detect code changes in development tornado.concurrent — Work with Future objects tornado.log — Logging support tornado.options — Command-line parsing tornado.testing — Unit testing support for discussed in depth in the next section of this guide. Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await or yield keyword to suspend and resume0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 6.0 Documentation
import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), Automatically detect code changes in development tornado.concurrent — Work with Future objects tornado.log — Logging support tornado.options — Command-line parsing tornado.testing — Unit testing support for discussed in depth in the next section of this guide. Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await or yield keyword to suspend and resume0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 5.1 Documentation
tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) if __name__ depth in the next section of this guide. 5.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await or yield keyword to suspend and resume IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.1 Documentation
tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) if __name__ depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await or yield keyword to suspend and resume IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.5 Documentationimport asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await keyword to suspend and resume execution IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.0 Documentation
tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) if __name__ depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await or yield keyword to suspend and resume IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 4.5 Documentation
tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) if __name__ response. body achieves the same result. 4.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python yield keyword to suspend and resume execution IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 6.4 Documentation
import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await keyword to suspend and resume execution IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await keyword to suspend and resume execution IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async depth in the next section of this guide. 6.1.3 Coroutines Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python await keyword to suspend and resume execution IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













