Standalone ZPT?

Paul Boddie paul at
Fri Aug 23 12:12:24 EDT 2002

richie at (Richie Hindle) wrote in message news:<8a6ba1da.0208222252.6dcc60ea at>...
> Paul,
> > I've also written a template system which uses 'id' attributes, [...]
> > it uses the various XML libraries
> In an ideal world I'd have done the same, but I wanted something that
> worked with partial HTML and 'invalid' HTML.  I also wanted it to work
> "out of the box" with Python 1.5.2 for a couple of dull reasons.

It's really a case of "horses for courses" - my template system is
highly XML-centric, and for that reason, there are some strict
requirements on the well-formed nature of documents.

> > and deserves to be a bit faster
> For intensive work I'm sure you're right, but for simply setting the
> values of a few controls, or stitching together several components
> into a single page, I wonder whether the XML approach doesn't carry
> too much overhead.  I speak from total ignorance, however...

I wonder too. ;-) However, your approach seems right for certain kinds
of problems. Again, it's the case that something too heavy won't bring
any additional benefits, and your use of regular expressions and so on
really mean that PyMeld is targeted at something different to what
I've been thinking of. It's obviously likely that my system just
wouldn't perform in those kinds of situations.

> > [Paul's system] requires the data
> > used in the final output to originate from an XML document [...]
> > If XML-centric projects aren't your thing, then I can imagine that
> > this might cause your interest to be discontinued almost immediately
> 'Fraid so!  8-)  I'm not dealing with XML at all - the only reason I
> mention it in relation to PyMeld is that PyMeld might be a good
> solution if you're looking for a quick way to tweak XML, or if you
> need to deal with XML-style data that's not actually valid XML.  It's
> deliberately informal and unrigorous - sometimes that's what you want.
>  Caveat adoptor.

Right. My obsession is to use XML as the basis for both the templates
and the data. Obviously, this is a step too far in the XML direction
for many people.

> > I haven't released this work yet [...] partly because I became
> > ambitious
> That's another reason PyMeld is super-simple - I needed it to be
> finished before the end of the decade!  I have any number of
> half-finished projects that I never completed because I "became
> ambitious"... it's the curse of the enthusiast programmer.

Also, being a private project, one can afford to experiment with
different implementations and ideas. In the last similar
implementation I did, I had XML documents being produced which would
guide the software in its activities, and that brought up the
interesting possibility of "compiling" intermediate XML
representations which would be used by the software to do something,
whilst being available for perusal by the developer (valuable for
testing, for example). It was like the notion of compiling code into
something that the machine can execute a lot more easily.


More information about the Python-list mailing list