Re: Code Generator written in python

2010-01-14 Thread Arnaud Delobelle
trzewiczek writes: > On 01/13/2010 05:09 PM, Arnaud Delobelle wrote: [...] >> Sure, here are some example of self-evaluating python objects, >> i.e. for each v below, >> >> v == eval(v) >> >> I'm quite proud of the last one. [...] >> v = "\"%s\" %% ((r\"%s\",)*2)" % ((r"\"%s\" %% ((r\"%s\

Re: Code Generator written in python

2010-01-14 Thread trzewiczek
On 01/13/2010 05:09 PM, Arnaud Delobelle wrote: nyoka writes: Can someone help me with sample python code for a code generator Sure, here are some example of self-evaluating python objects, i.e. for each v below, v == eval(v) I'm quite proud of the last one. v = (lambda x

Re: Code Generator written in python

2010-01-14 Thread Steve Ferg
http://nedbatchelder.com/code/cog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Code Generator written in python

2010-01-13 Thread Gabriel Genellina
En Wed, 13 Jan 2010 13:09:38 -0300, Arnaud Delobelle escribió: nyoka writes: Can someone help me with sample python code for a code generator Sure, here are some example of self-evaluating python objects, i.e. for each v below, v == eval(v) I'm quite proud of the last one.

Re: Code Generator written in python

2010-01-13 Thread Arnaud Delobelle
nyoka writes: > Can someone help me with sample python code for a code generator Sure, here are some example of self-evaluating python objects, i.e. for each v below, v == eval(v) I'm quite proud of the last one. v = (lambda x:x%('"''""'+x+'"''""'))("""(lambda x:x%%('"''""'+x+'"''""'

Re: Code Generator written in python

2010-01-13 Thread Peter Otten
nyoka wrote: > Can someone help me with sample python code for a code generator >>> print "print" print Seriously, you have to provide more information if you want a meaningful answer. If the generated code is Python, too, then the advice is most likely that you don't need to generate any code

Re: Code Generator written in python

2010-01-13 Thread Stefan Behnel
nyoka, 13.01.2010 16:48: Can someone help me with sample python code for a code generator Such as Cheetah? http://www.cheetahtemplate.org/ BTW, you might want to be more specific about your problem at hand. Code generation is a rarely used technique in Python. Most of the time, it's more ma

Code Generator written in python

2010-01-13 Thread nyoka
Can someone help me with sample python code for a code generator -- http://mail.python.org/mailman/listinfo/python-list