diff options
author | Greg Ward <gward@python.net> | 2000-06-08 00:02:36 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-08 00:02:36 (GMT) |
commit | ebec02a92c578cbdc7d269735a723c78b3265c19 (patch) | |
tree | c8e8266fb137d2a18e9a2e4fd14c461d686677f1 | |
parent | 5108db6232a026631361f378297e2c7e16f09792 (diff) | |
download | cpython-ebec02a92c578cbdc7d269735a723c78b3265c19.zip cpython-ebec02a92c578cbdc7d269735a723c78b3265c19.tar.gz cpython-ebec02a92c578cbdc7d269735a723c78b3265c19.tar.bz2 |
Added 'debug_print()' method (driven by DEBUG global from distutils.core).
-rw-r--r-- | Lib/distutils/cmd.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py index 9f63f83..c9b5624 100644 --- a/Lib/distutils/cmd.py +++ b/Lib/distutils/cmd.py @@ -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) |