[ZPT] python expressions
Brent Hendricks
brentmh@ece.rice.edu
Fri, 27 Apr 2001 15:52:25 -0500
On Fri, Apr 27, 2001 at 10:55:31AM -0400, Evan Simpson wrote:
> From: "Peter Bengtsson" <peter@grenna.net>
> > Maybe I'm too stupid too understand, but the TALES spec doesn't tell me
> much
> > on how to use it. Perhaps a couple of examples (no, _lots_ of examples :).
>
> Yes, all of the ZPT-related tools need a lot more documentation.
>
> > First of all, does TALES exist yet? In the way that TAL does, being
> > downloadable from http://www.zope.org/Members/4am/ZPT.
>
> It is implemented as part of the ZPT product, which contains TALES.py
>
> > I would like to see a little conversion dictionary for DTML junkies like
> myself.
> > For example the equivalent for:
> > <h2><dtml-var title></h2>
> > == in TAL syntax ==
> > <h2 tal:content="here/title">The title</h2>
>
> Yes, some kind of cookbook is definitely in order.
In an effort to teach myself ZPT I tried to go through the Zope
Tutorial and do all of the examples using ZPT instead of DTML.
If it helps you any, I've put all of the examples done in ZPT on my
website at http://www.ece.rice.edu/~brentmh/zpt_tut-0.1.zexp. You
find it useful to compare them to the equivalent DTML examples in the
orginal Zope Tutorial.
This was my first stab at writing ZPT, so I'm open to suggestions for
improvements :) Also, I couldn't quite get lesson 10 (using the
mailhost object) to work from zpt. If anyone figures it out, please
let me know, and I'll upload a new version.
--Brent Hendricks
PS. Just to reiterate, what I've put up is *not* a tutorial on using
ZPT. It is the examples from the existing Zope Tutorial, reworked to
use ZPT instead of DTML.
-------------------------------------------------------------------------
"The programmer, like the poet, works only slightly removed from pure
thought-stuff. He builds his castles in the air, from air, creating
by exertion of the imagination. Few media of creation are so
flexible, so easy to polish and rework, so readily capable of
realizing grand conceptual structures."
-- Frederick Brooks, Jr., The Mythical Man Month