Added 'debug_print()' method (driven by DEBUG global from distutils.core).

This commit is contained in:
Greg Ward 2000-06-08 00:02:36 +00:00
parent 5108db6232
commit ebec02a92c

View 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)