gpp (conditional compilation)
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Wed May 2 21:02:32 EDT 2007
En Wed, 02 May 2007 14:37:40 -0300, maxwell at ldc.upenn.edu
<maxwell at umiacs.umd.edu> escribió:
> I'm trying to use the gpp utility (Gnu points to
> http://en.nothingisreal.com/wiki/GPP)
> to do conditional compilation in Python, and I'm running into a
> problem: the same '#' character introduces Python comments and is used
> by default to introduce #ifdef etc. lines.
>
> Here's an example of what I'm trying to do:
>
> #ifdef DEBUG
> stderr.write("variable is...") #details of msg omitted
> #endif
In addition to all previous comments, I just want to menction the
existence of Tools/Scripts/ifdef.py, included in every Python install; it
can process #if #ifdef #else etc.
--
Gabriel Genellina
More information about the Python-list
mailing list