PyDocs

Nav

Concurrent Execution

check_call

subprocess

function (source) not Androidnot iOSnot WASI
  • check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, cwd=None, timeout=None, **other_popen_kwargs)
Run command with arguments.  Wait for command to complete.  If
the exit code was zero then return, otherwise raise
CalledProcessError.  The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function.  Example:

check_call(["ls", "-l"])
Changed in 3.3, 3.12
  • 3.3: timeout was added.
  • 3.12: Changed Windows shell search order for shell=True. The current directory and %PATH% are replaced with %COMSPEC% and %SystemRoot%\System32\cmd.exe. As a result, dropping a malicious program named cmd.exe into a current directory no longer works.
0 Examples
No examples for subprocess/check_call.
See Also
No see-alsos for subprocess/check_call
0 Notes
No notes for check_call