def do_quietly(command):
    """Run a command in a shell, and suppress all output."""
    proc = subprocess.run(
        command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
    )
    return proc.returncode
Run a command in a shell, and suppress all output.
igor.py