[Python-checkins] CVS: distutils/distutils cmd.py,1.17,1.18

Greg Ward python-dev@python.org
Wed, 7 Jun 2000 17:02:39 -0700


Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv15602

Modified Files:
	cmd.py 
Log Message:
Added 'debug_print()' method (driven by DEBUG global from distutils.core).

Index: cmd.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/cmd.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** cmd.py	2000/06/04 14:21:28	1.17
--- cmd.py	2000/06/08 00:02:36	1.18
***************
*** 8,12 ****
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: cmd.py,v 1.17 2000/06/04 14:21:28 gward Exp $"
  
  import sys, os, string, re
--- 8,12 ----
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: cmd.py,v 1.18 2000/06/08 00:02:36 gward Exp $"
  
  import sys, os, string, re
***************
*** 172,175 ****
--- 172,184 ----
          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
+