conditional running of code portion

Ramchandra Apte maniandram01 at gmail.com
Sun Aug 5 00:43:43 EDT 2012


Try pypreprocessor <http://code.google.com/p/pypreprocessor/> .
Better idea:
You should be using the
logging<http://docs.python.org/library/logging.html>module if you want
to print debug information quickly.It uses threads and
is optimized to run fast.

On 5 August 2012 09:46, JW Huang <ngcbmy at gmail.com> wrote:

> Hi,
>
> How can I implement something like C++'s conditional compile.
>
> if VERBOSE_MODE: print debug information
> else: do nothing
>
> But I don't want this condition to be checked during runtime as it
> will slow down the code.
>
> Thanks in advance.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120805/2d2a3e66/attachment.html>


More information about the Python-list mailing list