472,351 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,351 software developers and data experts.

recommended general-purpose string template packages?

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

Aug 14 '06 #1
6 1745
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

Aug 14 '06 #2

John Machin wrote:
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

Aug 14 '06 #3
Ravi Teja wrote:
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.
Aug 14 '06 #4
On 13 Aug 2006 19:48:55 -0700,
"John Machin" <sj******@lexicon.netwrote:
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.
And don't forget Python's Template class:

http://docs.python.org/lib/node109.html

Regards,
Dan

--
Dan Sommers
<http://www.tombstonezero.net/dan/>
"I wish people would die in alphabetical order." -- My wife, the genealogist
Aug 15 '06 #5
vj
I use preppy from reportlab:

http://www.reportlab.org/preppy.html

It's one file, is fast and can be easily embedded in any application.

Vineet

Aug 15 '06 #6

vj wrote:
I use preppy from reportlab:

http://www.reportlab.org/preppy.html
wow. thanks for the link. I second you on pretty. It is ultra-simple
and nothing but a gateway to python.

also, reportlab makes a number of high-quality open source python
wares.

Aug 16 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mikeg | last post by:
Hi, I'd like to explicitly link to the recommended php.ini file. For a long time, this link worked: ...
6
by: Huy | last post by:
Generic PHP newbie question here. May anyone please recommend books that have gotten you started on PHP (interfacing with MySQL is a plus) & also...
7
by: Mike Kamermans | last post by:
I hope someone can help me, because what I'm going through at the moment trying to edit XML documents is enough to make me want to never edit XML...
22
by: Jonathan Snook | last post by:
I've been contemplating what the recommended usage of a "top of page" link should be? Should there only ever be one at the bottom of the page?...
1
by: Rubio | last post by:
I'm trying find guidelines or recommendation for a .NET naming scheme within a company. -- Rubio
18
by: John Salerno | last post by:
Hi all. I was hoping some of you could recommend a book or two that would help me get started with the basics of C#. I have a slight knowledge of...
22
by: Greg | last post by:
Hi, I'm considering using VB for .NET development (as opposed to C#). Does anyone have advice? Thank You -- Greg McPherran www.McPherran.com
16
by: Luqman | last post by:
Is it recommended to use datasets in ASP.Net 2.0 / VS.Net 2005 ? Best Regards, Luqman
4
by: MLH | last post by:
Have any of you heard of or used any commercially available 3rd party solution that addresses common forms of mdb file corruption? I don't think...
13
by: Michael M. | last post by:
In Perl, it was: ## Example: "Abc | def | ghi | jkl" ## -"Abc ghi jkl" ## Take only the text betewwn the 2nd pipe (=cut the text in the...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.