I’ve had opportunity to do some web programming in Python recently, and experimented with a few python templating libraries, and settled on Twiddler.   It is a DOM type library, which reads an html/xml page into a tree-data-structure, allows manipulation of that tree in Python, and then re-renders the modified tree back into html or xml.

Your template file can be plain looking html, with id tags for the elements that matter, and the script can copy, fill, replicate, or delete those elements by their ids. 

The only documentation available was a newsgroup email summary, and the documentation in the archive.  Now, there is a jottit page at ‘http://twiddler.jottit.com’ with the documentation files added.  I hope to add more pages as I learn more.  I would like to see this library be more widely known and used.

Advertisements