Commit Graph

11 Commits

Author SHA1 Message Date
Ben Darnell 6c2aae090c all: Support lazy imports of submodules
A getattr hook in the top-level "tornado" package now imports submodules
automatically, eliminating the need to explicitly reference multiple submodules
in imports
2022-11-27 15:41:27 -05:00
Ben Darnell b909d37e54 docs,demos: Update for asyncio.run pattern
Adapt for Python 3.10 deprecation changes by using asyncio.run
instead of IOLoop.start throughout (except for TCPServer multi-process
docs).

Demos have all been changed but I haven't tested all of them.
2022-06-03 14:50:20 -04:00
laggardkernel b7822526cf Cleanup py2 import code in demo 2021-12-08 18:55:39 +08:00
Ben Darnell 1e9a709111 demos: Format all the demos with `black` 2018-11-02 12:56:28 -04:00
Ben Darnell e332a7de7e *: Remove Python2 __future__ imports throughout the codebase 2018-07-14 16:58:48 -04:00
Jehiah Czebotar bfcf34a95b demos/file_uploader: add missing __name__ == __main__ stanza 2018-01-06 21:21:41 -05:00
Jehiah Czebotar 8906b3afd8 make executable bit and shebang consistent on various source files
setup.py is intended to be run with "python setup.py install"

sources in the tornado module which have main functions/clauses
are intended to be run with "python -m tornado.xxx"

various demos and scripts can be run directly
2018-01-06 20:35:44 -05:00
Pierce Lopez e92aa20f2d file_upload demo: write multi-part framing in one call 2017-09-12 16:57:50 -04:00
Pierce Lopez ab42d83714 file_upload demo: yield write() cb in body_producer 2017-09-08 17:49:55 -04:00
Chris Gavin 26e5779a50 Fix file upload demo on Python 2. 2017-04-25 21:40:22 +01:00
A. Jesse Jiryu Davis 0fcbadc70d docs: Demonstrate uploading and receiving files 2016-11-04 21:42:01 -04:00