Tornado 6.0 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified the single quote to the list of escaped characters. """ return _XHTML_ESCAPE_RE.sub( lambda match: _XHTML_ESCAPE_DICT[match.group(0)], to_basestring(value) ) [docs]def xhtml_unescape(value:0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 6.1 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified by the single quote to the list of escaped characters. """ return _XHTML_ESCAPE_RE.sub( lambda match: _XHTML_ESCAPE_DICT[match.group(0)], to_basestring(value) ) [docs]def xhtml_unescape(value:0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 4.5 Documentation
my_future = Future() fetch_future = http_client.fetch(url) fetch_future.add_done_callback( lambda f: my_future.set_result(f.result())) return my_future The raw Future version is more complex batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Interaction with callbacks To interact with necessary to suppress the logging by ensuring that the exception is observed: f.add_done_callback(lambda f: f.exception()). Consumer methods Future.result(timeout=None) If the operation succeeded, return0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 4.5 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) fetch_future.add_done_callback( lambda f: my_future.set_result(f.result())) return my_future The raw Future version is more complex, but batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Interaction with callbacks To interact with neces- sary to suppress the logging by ensuring that the exception is observed: f.add_done_callback(lambda f: f.exception()). Consumer methods Future.result(timeout=None) If the operation succeeded, return0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 6.1 Documentation
Release 6.1 # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 5.1 Documentation
Release 5.1.1 # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.4 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.2 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 6.4 Documentation
batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way command-line and file-based options: define("config", type=str, help="path to config file", callback=lambda path: parse_config_file(path, final=False)) With this definition, options in the file specified0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













