PyDocs

Nav

Concurrent Execution

call

subprocess

function (source) not Androidnot iOSnot WASI
  • 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 or
for timeout seconds, then return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

retcode = 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/call.
See Also
No see-alsos for subprocess/call
0 Notes
No notes for call