format strings or page tempaltes
Alex Martelli
aleax at aleax.it
Wed Jul 24 04:44:45 EDT 2002
Jeff Davis wrote:
...
> Is this possible with the string format syntax? If not, could someone
> recommend a good template module or something similar?
It's quite possible, but a good templating system is a better idea.
The first "real" task I once did in Python was a tiny templating
system -- I was truly amazed at how much I could accomplish in a
few dozen lines, it was part of what truly hooked me on Python.
You can find it as YAPTU in the cookbook, both online and printed.
But a real templating system is something else again. I've now
personally dumped YAPTU usage and, after careful examination of
all the various offerings around, switched to Cheetah instead.
Give Cheetah a try. You won't regret it.
Alex
More information about the Python-list
mailing list