473,699 Members | 2,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1795
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******@lexic on.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.tombstoneze ro.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
1797
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: http://cvs.php.net/co.php/php4/php.ini-recommended (In fact, if you google for "php ini recommended", that broken link comes up first).
6
2260
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 reference books? Just looking for some good quality books to purchase.
7
4386
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 again. I'm looking for an XML editor that has a few features that you'd expect in any editor, except nearly none of them seem to have: 1 - Search and repalce with Regular Expressions. 2 - Search and Replace in an Xpath context. 3 - User specified tag-generation for either on a...
22
5137
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? Should they be sprinkled at various points on the page? Or should they be used at all? Lately, I've been leaning towards the last option because my thought is that most browsers have a method to make it back to the top of the page (home button, scroll bar, whatever). It seems I never use the...
1
1297
by: Rubio | last post by:
I'm trying find guidelines or recommendation for a .NET naming scheme within a company. -- Rubio
18
13920
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 programming, but basically I want to start out like I know nothing, so I don't skip anything. I considered Microsoft Visual C# .NET Step by Step 2003 by Sharp/Jagger, but then I read a few reviews and it doesn't sound so good. I have XP Home, and I plan to buy only Visual C#, not Visual Studio,...
22
1301
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
1929
by: Luqman | last post by:
Is it recommended to use datasets in ASP.Net 2.0 / VS.Net 2005 ? Best Regards, Luqman
4
1187
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 FMS has anything like this. Perhaps other company does?
13
2096
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 1st pipe). $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; ## -- remove in text
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.