mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Added 'debug_print()' method (driven by DEBUG global from distutils.core).
This commit is contained in:
parent
5108db6232
commit
ebec02a92c
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue