[3.6] bpo-32392: Document env keyword argument of subprocess.run() (G… · python/cpython@2795644 (original) (raw)
`` @@ -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)
`
``
42
`+
encoding=None, errors=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.
``
`` @@ -75,6 +75,11 @@ compatibility with older versions, see the :ref:call-function-trio
section.
``
75
75
`` specified encoding and errors or the :class:io.TextIOWrapper
default.
``
76
76
` Otherwise, file objects are opened in binary mode.
`
77
77
``
``
78
If *env* is not ``None``, it must be a mapping that defines the environment
``
79
`+
variables for the new process; these are used instead of the default
`
``
80
`+
behavior of inheriting the current process' environment. It is passed directly
`
``
81
`` +
to :class:Popen
.
``
``
82
+
78
83
` Examples::
`
79
84
``
80
85
` >>> subprocess.run(["ls", "-l"]) # doesn't capture output
`