diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-01 22:46:32 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-01 22:46:32 +0100 |
| commit | ea6b4e215be5da305bde53aa84fd11148ec3d1b0 (patch) | |
| tree | 582d27c481add22647a870cc0bf619619d3d64d3 /examples/child_process.py | |
| parent | 6dd8d720a3399f8ab9079571a55d5b706ab073f3 (diff) | |
| download | trollius-ea6b4e215be5da305bde53aa84fd11148ec3d1b0.tar.gz | |
Merge (manually) the subprocess_stream into default
* Add a new asyncio.subprocess module
* Add new create_subprocess_exec() and create_subprocess_shell() functions
* The new asyncio.subprocess.SubprocessStreamProtocol creates stream readers
for stdout and stderr and a stream writer for stdin.
* The new asyncio.subprocess.Process class offers an API close to the
subprocess.Popen class:
- pid, returncode, stdin, stdout and stderr attributes
- communicate(), wait(), send_signal(), terminate() and kill() methods
* Remove STDIN (0), STDOUT (1) and STDERR (2) constants from base_subprocess
and unix_events, to not be confused with the symbols with the same name of
subprocess and asyncio.subprocess modules
* _ProactorBasePipeTransport.get_write_buffer_size() now counts also the size
of the pending write
* _ProactorBaseWritePipeTransport._loop_writing() may now pause the protocol if
the write buffer size is greater than the high water mark (64 KB by default)
* Add new subprocess examples: shell.py, subprocess_shell.py,
* subprocess_attach_read_pipe.py and subprocess_attach_write_pipe.py
Diffstat (limited to 'examples/child_process.py')
| -rw-r--r-- | examples/child_process.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/child_process.py b/examples/child_process.py index 4410414..0c12cb9 100644 --- a/examples/child_process.py +++ b/examples/child_process.py @@ -1,7 +1,9 @@ """ Example of asynchronous interaction with a child python process. -Note that on Windows we must use the IOCP event loop. +This example shows how to attach an existing Popen object and use the low level +transport-protocol API. See shell.py and subprocess_shell.py for higher level +examples. """ import os |
