Try <a href="http://code.google.com/p/pypreprocessor/">pypreprocessor</a> .<div>Better idea:</div><div>You should be using the <a href="http://docs.python.org/library/logging.html">logging</a> module if you want to print debug information quickly.It uses threads and is optimized to run fast.</div>
<div><div><br><div class="gmail_quote">On 5 August 2012 09:46, JW Huang <span dir="ltr"><<a href="mailto:ngcbmy@gmail.com" target="_blank">ngcbmy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
How can I implement something like C++'s conditional compile.<br>
<br>
if VERBOSE_MODE: print debug information<br>
else: do nothing<br>
<br>
But I don't want this condition to be checked during runtime as it<br>
will slow down the code.<br>
<br>
Thanks in advance.<br>
<span class="HOEnZb"><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div></div>