]> granicus.if.org Git - python/commitdiff
Added 'debug_print()' method (driven by DEBUG global from distutils.core).
authorGreg Ward <gward@python.net>
Thu, 8 Jun 2000 00:02:36 +0000 (00:02 +0000)
committerGreg Ward <gward@python.net>
Thu, 8 Jun 2000 00:02:36 +0000 (00:02 +0000)
Lib/distutils/cmd.py

index 9f63f838a72d10f0e1b475f7ddc35af1185b5ff0..c9b5624f8a231a467a54ea684474e40508fce597 100644 (file)
@@ -172,6 +172,15 @@ class Command:
         if self.verbose >= level:
             print msg
 
+    def debug_print (self, msg):
+        """Print 'msg' to stdout if the global DEBUG (taken from the
+        DISTUTILS_DEBUG environment variable) flag is true.
+        """
+        from distutils.core import DEBUG
+        if DEBUG:
+            print msg
+        
+
 
     # -- Option validation methods -------------------------------------
     # (these are very handy in writing the 'finalize_options()' method)