til/Development/Python/subprocess.md

191 B

subprocess

import subprocess

subprocess.run(["ls", "-a"])

# Stop when run error
subprocess.run(["exit 1"], check=True)