recommended general-purpose string template packages?

J

John Machin

Hi,

In general, I'm mainly interested in a template engine for dynamic web
pages but would like a general purpose one to avoid learning yet
another package for generating e-mail messages, form letters, source
code, whatever.

In particular, does anyone have much experience with the Python
interface to Terence Parr's StringTemplate
(http://www.stringtemplate.org/)? Reading the website, I'm attracted by
the approach, but a Google search (both generally and in this
newsgroup) gives me the impression that it's little used in the Python
world.

TIA,
John
 
R

Ravi Teja

In general, I'm mainly interested in a template engine for dynamic web
pages but would like a general purpose one to avoid learning yet
another package for generating e-mail messages, form letters, source
code, whatever.

In particular, does anyone have much experience with the Python
interface to Terence Parr's StringTemplate
(http://www.stringtemplate.org/)? Reading the website, I'm attracted by
the approach, but a Google search (both generally and in this
newsgroup) gives me the impression that it's little used in the Python
world.

Most Python templating engines are general purpose. Choice between them
however is sometimes a matter of preference, like editors. I settled
down on Cheetah for most part.

Here is a list of some popular ones.
http://wiki.python.org/moin/Templating
 
M

metaperl

John said:
Hi,

In general, I'm mainly interested in a template engine for dynamic web
pages but would like a general purpose one to avoid learning yet
another package for generating e-mail messages, form letters, source
code, whatever.

HTMLTemplate and texttemplate offer a somewhat uniform approach to text
versus HTML... it attempts to raise string processing up to the level
of tree/HTML processing. That stringtemplate module seems to be aiming
for the lowest common denominator.

Interesting contrast in approaches:
http://freespace.virgin.net/hamish.sanderson/index.html
 
Y

Yu-Xi Lim

Ravi said:
Most Python templating engines are general purpose. Choice between them
however is sometimes a matter of preference, like editors. I settled
down on Cheetah for most part.

I second Cheetah. It's suitable for most text templates. Many others are
specific for XML or HTML documents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top