summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/ccompiler.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-08-02 01:38:20 (GMT)
committerGreg Ward <gward@python.net>2000-08-02 01:38:20 (GMT)
commit9dddbb4009ecd3efde478225170ac8fc287da8e8 (patch)
treeb688f860585ee5d071756cf00758e0ce28238521 /Lib/distutils/ccompiler.py
parentd7faa81616c4205f48b16fc44220fc167d12e9c0 (diff)
downloadcpython-9dddbb4009ecd3efde478225170ac8fc287da8e8.zip
cpython-9dddbb4009ecd3efde478225170ac8fc287da8e8.tar.gz
cpython-9dddbb4009ecd3efde478225170ac8fc287da8e8.tar.bz2
Added 'execute()' method, a thin wrapper around 'util.execute() (just like
the one in cmd.py).
Diffstat (limited to 'Lib/distutils/ccompiler.py')
-rw-r--r--Lib/distutils/ccompiler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index eb6200f..d8d8ab9 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -15,7 +15,7 @@ from distutils.spawn import spawn
from distutils.file_util import move_file
from distutils.dir_util import mkpath
from distutils.dep_util import newer_pairwise, newer_group
-from distutils.util import split_quoted
+from distutils.util import split_quoted, execute
class CCompiler:
@@ -784,6 +784,9 @@ class CCompiler:
def warn (self, msg):
sys.stderr.write ("warning: %s\n" % msg)
+ def execute (self, func, args, msg=None, level=1):
+ execute(func, args, msg, self.verbose >= level, self.dry_run)
+
def spawn (self, cmd):
spawn (cmd, verbose=self.verbose, dry_run=self.dry_run)