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

subprocess.check_call

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


Import

import subprocess
from subprocess import check_call

Signature & Overview

subprocess.check_call(*popenargs, **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

Usage

import subprocess
import sys

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

Gotchas

REPL Inspect

from subprocess import check_call
help(check_call)

Linked from

Related notes