Lines Matching refs:subprocess
3 .. _asyncio-subprocess:
27 Create a subprocess: high-level API using Process
32 Create a subprocess.
38 Return a :class:`~asyncio.subprocess.Process` instance.
50 Return a :class:`~asyncio.subprocess.Process` instance.
65 Create a subprocess: low-level API using subprocess.Popen
68 Run subprocesses asynchronously using the :mod:`subprocess` module.
70 …ubprocess_exec(protocol_factory, \*args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=sub…
72 Create a subprocess from one or more string arguments (character strings or
78 similar to the standard library :class:`subprocess.Popen` class called with
80 however, where :class:`~subprocess.Popen` takes a single argument which is
89 to the subprocess's standard input stream using
91 :const:`subprocess.PIPE` (the default). By default a new pipe will be
95 to the subprocess's standard output stream using
97 :const:`subprocess.PIPE` (the default). By default a new pipe will be
101 to the subprocess's standard error stream using
103 :const:`subprocess.PIPE` (the default) or :const:`subprocess.STDOUT`.
105 :const:`subprocess.STDOUT` is specified, the subprocess's standard error
108 * All other keyword arguments are passed to :class:`subprocess.Popen`
117 See the constructor of the :class:`subprocess.Popen` class for parameters.
119 …process_shell(protocol_factory, cmd, \*, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=sub…
121 Create a subprocess from *cmd*, which is a character string or a bytes
124 :class:`subprocess.Popen` class called with ``shell=True``.
153 .. data:: asyncio.subprocess.PIPE
159 .. data:: asyncio.subprocess.STDOUT
166 .. data:: asyncio.subprocess.DEVNULL
176 .. class:: asyncio.subprocess.Process
178 A subprocess created by the :func:`create_subprocess_exec` or the
181 The API of the :class:`~asyncio.subprocess.Process` class was designed to be
182 close to the API of the :class:`subprocess.Popen` class, but there are some
185 * There is no explicit :meth:`~subprocess.Popen.poll` method
186 * The :meth:`~subprocess.Popen.communicate` and
187 :meth:`~subprocess.Popen.wait` methods don't take a *timeout* parameter:
191 * The :meth:`~asyncio.subprocess.Process.wait` method of
192 the :class:`~asyncio.subprocess.Process` class is asynchronous whereas the
193 :meth:`~subprocess.Popen.wait` method of the :class:`~subprocess.Popen`
197 :ref:`Subprocess and threads <asyncio-subprocess-threads>` section.
303 .. _asyncio-subprocess-threads:
316 The :class:`asyncio.subprocess.Process` class is not thread safe.
330 Example of a subprocess protocol using to get the output of a subprocess and to
331 wait for the subprocess exit. The subprocess is created by the
353 # Create the subprocess controlled by the protocol DateProtocol,
360 # Wait for the subprocess exit using the process_exited() method
386 Example using the :class:`~asyncio.subprocess.Process` class to control the
387 subprocess and the :class:`StreamReader` class to read from the standard
388 output. The subprocess is created by the :func:`create_subprocess_exec`
391 import asyncio.subprocess
398 # Create the subprocess, redirect the standard output into a pipe
400 stdout=asyncio.subprocess.PIPE)
407 # Wait for the subprocess exit