[python-win32] python print statements

Jim Vickroy Jim.Vickroy at noaa.gov
Wed Jan 7 23:27:45 CET 2009


Nalli Dinesh wrote:
> Hi,
>  
> python print statements are extensively used in my application for 
> debugging purpose. My application is ready, but I do not want to 
> remove the print statements and at the same time I do not want python 
> interpreter to execute/run the print statements. How can I accomplish 
> this scenario.
I do not believe this is feasible with *print* statements.  This is, 
however, easily doable using the standard Python /*logging*/ package 
where you would replace the print statements with calls to the logging 
function.  I use the logging package almost exclusively; I almost never 
use print statements in my code.

As an aside, this is a general Python question (comp.lang.python) not a 
Python-Windows specific question
>  
> Thanks in Advance,
>  
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090107/c057d7ba/attachment.htm>


More information about the python-win32 mailing list