India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML
« MySQL on Mandrake 9.1 with Python
» SWT for GUIs
I had a small need for simple HTML/XML templating with Python. After a quick look around for different templating modules for Python available now, I zeroed in on the following four:
I chose XYAPTU. Very simple and easy to understand code. It extends Alex Martelli’s YAPTU to be more XHTML/XML like.
Using XYAPTU is very simple. Make a template, with $variable
for substitution variables. Then you define a dictionary called the name space
and process the template with the name space. Examples are given within the module.
The realy beauty of this is that it supports conditionals, loops and expressions in addition to simple variable substitution. Just drop xyaptu.py and yaptu.py in your Python path and you are set to go!
If template creators are Python programmers, best option available now is PyMeld: http://www.entrian.com/PyMeld/