Commit 395c7343 authored by Victor Stinner's avatar Victor Stinner

Merge 3.4 (asyncio doc)

parents 0d6f9a04 39892055
...@@ -207,10 +207,15 @@ BaseSubprocessTransport ...@@ -207,10 +207,15 @@ BaseSubprocessTransport
.. method:: get_pipe_transport(fd) .. method:: get_pipe_transport(fd)
Return the transport for the communication pipe corresponding to the Return the transport for the communication pipe corresponding to the
integer file descriptor *fd*. The return value can be a readable or integer file descriptor *fd*:
writable streaming transport, depending on the *fd*. If *fd* doesn't
correspond to a pipe belonging to this transport, :const:`None` is * ``0``: readable streaming transport of the standard input (*stdin*),
returned. or :const:`None` if the subprocess was not created with ``stdin=PIPE``
* ``1``: writable streaming transport of the standard output (*stdout*),
or :const:`None` if the subprocess was not created with ``stdout=PIPE``
* ``2``: writable streaming transport of the standard error (*stderr*),
or :const:`None` if the subprocess was not created with ``stderr=PIPE``
* other *fd*: :const:`None`
.. method:: get_returncode() .. method:: get_returncode()
...@@ -239,6 +244,12 @@ BaseSubprocessTransport ...@@ -239,6 +244,12 @@ BaseSubprocessTransport
On Windows, the Windows API function TerminateProcess() is called to On Windows, the Windows API function TerminateProcess() is called to
stop the subprocess. stop the subprocess.
.. method:: close()
Ask the subprocess to stop by calling the :meth:`terminate` method if the
subprocess hasn't returned yet, and close transports of all pipes
(*stdin*, *stdout* and *stderr*).
.. _asyncio-protocol: .. _asyncio-protocol:
......
This diff is collapsed.
...@@ -634,7 +634,7 @@ Instances of the :class:`Popen` class have the following methods: ...@@ -634,7 +634,7 @@ Instances of the :class:`Popen` class have the following methods:
``None``, if no data should be sent to the child. The type of *input* ``None``, if no data should be sent to the child. The type of *input*
must be bytes or, if *universal_newlines* was ``True``, a string. must be bytes or, if *universal_newlines* was ``True``, a string.
:meth:`communicate` returns a tuple ``(stdoutdata, stderrdata)``. :meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``.
The data will be bytes or, if *universal_newlines* was ``True``, strings. The data will be bytes or, if *universal_newlines* was ``True``, strings.
Note that if you want to send data to the process's stdin, you need to create Note that if you want to send data to the process's stdin, you need to create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment