@@ -39,7 +39,7 @@ compatibility with older versions, see the :ref:`call-function-trio` section. |
|
|
39 |
39 |
|
40 |
40 |
.. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\ |
41 |
41 |
shell=False, cwd=None, timeout=None, check=False, \ |
42 |
|
- encoding=None, errors=None, text=None) |
|
42 |
+ encoding=None, errors=None, text=None, env=None) |
43 |
43 |
|
44 |
44 |
Run the command described by *args*. Wait for command to complete, then |
45 |
45 |
return a :class:`CompletedProcess` instance. |
@@ -78,6 +78,11 @@ compatibility with older versions, see the :ref:`call-function-trio` section. |
|
|
78 |
78 |
The *universal_newlines* argument is equivalent to *text* and is provided |
79 |
79 |
for backwards compatibility. By default, file objects are opened in binary mode. |
80 |
80 |
|
|
81 |
+ If *env* is not ``None``, it must be a mapping that defines the environment |
|
82 |
+ variables for the new process; these are used instead of the default |
|
83 |
+ behavior of inheriting the current process' environment. It is passed directly |
|
84 |
+ to :class:`Popen`. |
|
85 |
+ |
81 |
86 |
Examples:: |
82 |
87 |
|
83 |
88 |
>>> subprocess.run(["ls", "-l"]) # doesn't capture output |