[python-win32] python print statements

Vernon Cole vernondcole at gmail.com
Thu Jan 8 17:02:07 CET 2009


How about --
  if debug: print x
or, in a more complex setting, have a "verbose" attribute in each module and --
  if self.verbose > 2: print x   # so you can have levels of debug printouts
??
--
Vernon Cole

On Wed, Jan 7, 2009 at 11:30 PM, Michel Claveau <mc at mclaveau.com> wrote:
> Hi!
>
> 1) Define your print function. Example:
>   def mprint(*par):
>       for i in par:
>           print i,
>       print
>
> 2) in your code, replace all  'print'  by  'mprint'
>
> 3) when you want cancel the print, modify only the mprint function.
>
> @-salutations
> --
> Michel Claveau
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>


More information about the python-win32 mailing list