 Tornado 6.5 Documentationwiki/Links] Hello, world Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait()if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 437 页 | 405.14 KB | 3 月前3 Tornado 6.5 Documentationwiki/Links] Hello, world Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait()if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 437 页 | 405.14 KB | 3 月前3
 Tornado 6.5 DocumentationTornado Authors May 22, 2025CONTENTS 1 Quick links 3 2 Hello, world 5 3 Threads and WSGI 7 4 asyncio Integration 9 5 Installation 11 6 Documentation 13 6.1 User’s guide . . . . . . . . . . . . . linksCHAPTER TWO HELLO, WORLD Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous features;0 码力 | 272 页 | 1.12 MB | 3 月前3 Tornado 6.5 DocumentationTornado Authors May 22, 2025CONTENTS 1 Quick links 3 2 Hello, world 5 3 Threads and WSGI 7 4 asyncio Integration 9 5 Installation 11 6 Documentation 13 6.1 User’s guide . . . . . . . . . . . . . linksCHAPTER TWO HELLO, WORLD Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asynchronous features;0 码力 | 272 页 | 1.12 MB | 3 月前3
共 2 条
- 1
相关搜索词














