Python templates

James Tauber posted some examples of Python templates (originally from 2003).

Quoth James:

Back in 2003, I was playing around with building templates in Python by taking advantage of a combination of dictionary-based string substitution and the ability to late bind dictionary values using __getitem__.

It’s a nice series of examples, listed in order of increasing complexity.

3 Responses to “Python templates”

  1. Marc Says:

    Have you looked at Cheetah? Looks like a pretty cool templating system.

    http://cheetahtemplate.org/

  2. John Says:

    Hi Marc,

    I’ve played with Cheetah a tiny tiny tiny bit in the past (mostly via web.py). And lots of people seem to think rather highly of it… other than Guido. :)

  3. import this. » Blog Archive » Build AJAX apps in Python Says:

    [...] Quoth James Tauber (of Python templates fame): Many people, when first finding out about Google Web Toolkit, wonder “why can’t I use Python instead of Java?”. pyjamas is designed to make that possible. And we’re drawing heavily from Google’s work. [...]

Leave a Reply