Looking for very light weight template library (not framework)

Roman Bertle roman at smoerz.org
Fri Mar 7 05:04:52 EST 2008


* Malcolm Greene <python at bdurham.com>:
>  New to Python and looking for a template library that allows Python
>  expressions embedded in strings to be evaluated in place. In other words
>  something more powerful than the basic "%(variable)s" or "$variable"
>  (Template) capabilities.
[...]
> 
>  Use case:
> 
>  myOutput = """\
> 
>  The total cost is {{invoice.total}}.
[...]

You might look at YAPTU
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305A
or YAPTOO
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465508,
very small but powerful templating engines. I use YAPTU myself for
invoice templating.

Regards, Roman



More information about the Python-list mailing list