From 18cf3b897d4b1e1a66beda180ec151cc0dd4dbc3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 26 Oct 2021 10:51:29 -0400 Subject: build: force 'build' to shut up --- igor.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'igor.py') diff --git a/igor.py b/igor.py index 2e1f7aa5..c01cc759 100644 --- a/igor.py +++ b/igor.py @@ -14,6 +14,7 @@ import glob import inspect import os import platform +import subprocess import sys import sysconfig import textwrap @@ -351,6 +352,12 @@ def print_banner(label): sys.stdout.flush() +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 + + def do_help(): """List the available commands""" items = list(globals().items()) -- cgit v1.2.1