c macros in python.

Cameron Laird claird at lairds.us
Mon May 7 08:49:25 EDT 2007


In article <f1lg15$g0k$1 at talisker.lacave.net>,
Amaury Forgeot d'Arc  <afaNOSPAM at neuf.fr> wrote:
>noagbodjivictor at gmail.com a écrit :
>> Hey,
>> 
>> I'm writing a script to generate code. I'm a bit tired of typing
>> outfile.write(....). Does python have a way to c-like macros? Every
>> instance of o(...) in the code will be replaced by outfile.write(...)?
>
>First: Python has no macro facility.
			.
			.
			.
For the sake of completeness, I want to note that the standard
distribution includes Tools/Scripts/ifdef.py, and pyparsing now
has an example macro preprocessor.  Neither of these would be
the correct response to the original question, of course, but 
they might interest other readers who believe they need "c-like
macros".



More information about the Python-list mailing list