The timeout argument is passed to municate(). PIPE for the stdout and/or stderr arguments. This does not capture stdout or stderr by default. Input and check, all the arguments to this function are passed through to Same as that of the Popen constructor - apart from timeout,
The full function signature is largely the In Frequently Used Arguments (hence the use of keyword-only notation The arguments shown above are merely the most common ones, described below run ( args, *, stdin=None, input=None, stdout=None, stderr=None, shell=False, cwd=None, timeout=None, check=False, encoding=None, errors=None, env=None )
The run() function was added in Python 3.5 if you need to retainĬompatibility with older versions, see the Older high-level API section. Underlying Popen interface can be used directly. The recommended approach to invoking subprocesses is to use the run()įunction for all use cases it can handle.