]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added 'execute()' method, a thin wrapper around 'util.execute() (just like
authorGreg Ward <gward@python.net>
Wed, 2 Aug 2000 01:38:20 +0000 (01:38 +0000)
committerGreg Ward <gward@python.net>
Wed, 2 Aug 2000 01:38:20 +0000 (01:38 +0000)
the one in cmd.py).

Lib/distutils/ccompiler.py

index eb6200f638c86112f31a35ff2edc5a3238bd8fd7..d8d8ab916c3b4fa6ad5f1ba136d5dba07e4469b4 100644 (file)
@@ -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)