thakadu thakadu at gmail.com
Mon Jan 30 21:28:40 EST 2006

I have used PyMeld (http://www.entrian.com/PyMeld/) which is one of
very few that gives a 100% separation of code and presentation, in fact
PyMeld is not strictly speaking a template system at all.
I have also used Cheetah. (http://www.cheetahtemplate.org/) However for
a recent project (http://muti.co.za) I ended up using Python's built in
%s templating engine. The reason for this was performance. The %s
native system is extremely fast. In my somewhat informal benchmarks
PyMeld was two orders of magnitude and Cheetah one order of magnitude
slower than Python native templates.
I don't mean to criticze these two systems, they are both excellent,
and I probably could have spent some time trying to figure out why they
were so much slower but in the end it was quicker for me to go with
something I knew was super fast. I did try compiling the Cheetah
templates which provided a small performace boost but it was still much
slower than native templates. (I also tried the new $ based native
template system in Python 2.4 but it doesnt have the flexible
formatting support that the % one has)

More information about the Python-list mailing list