On this page
  1. subprocess.call
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

subprocess.call

Up: subprocess | Next: subprocess.CalledProcessError
Rel: subprocess.CalledProcessError, subprocess.check_call, subprocess.check_output, subprocess.CompletedProcess
Ref: docs.python.org — subprocess.call
Tags: #public #python3 #stdlib #subprocess


Import

import subprocess
from subprocess import call

Signature & Overview

subprocess.call(*popenargs, timeout=None, **kwargs)

Run command with arguments. Wait for command to complete or for timeout seconds, then return the returncode attribute.

Usage

import subprocess
import sys

rc = subprocess.call([sys.executable, "-c", "pass"])
assert rc == 0

Gotchas

REPL Inspect

from subprocess import call
help(call)

Linked from

Related notes