[ZPT] ZPT and Python Scripts

Jeff Peterson jpeterso at rangebroadband.com
Fri Sep 26 19:56:16 EDT 2003


Zope Page Template (ZPT), you can return them from the script, in the
fashion shown previously.

> -----Original Message-----
> From: zpt-bounces at zope.org [mailto:zpt-bounces at zope.org]On Behalf Of Bob
> Gailer
> Sent: Friday, September 26, 2003 9:14 AM
> To: Tino Wildenhain
> Cc: zpt at zope.org
> Subject: Re: [ZPT] ZPT and Python Scripts
>
>
> At 12:33 AM 9/26/2003, Tino Wildenhain wrote:
>
> >Hi Bob,
> >
> >Evan Simpson wrote:
> >>Bob Gailer wrote:
> >>
> >>>I have wandered around the Zope Book and the ZPT archive. I am still
> >>>wishing for some comprehensive explanation of the various ways one can
> >>>invoke python scripts and use the results in zpt. I have found
> a number
> >>>of interesting examples, but no technical explanation of the
> mechanisms.
> >>
> >>I'm not sure what you're looking for.  You call a Script, you get back
> >>whatever data structure you build in the Script.  If it's a
> sequence, you
> >>can use tal:repeat on it.  If it's a dictionary, you can use paths to
> >>access the values in it.  By nesting sequences and
> dictionaries, you can
> >>do complex things, but this has nothing in particular to do
> with "mechanisms".
> >
> >As long as we dont have these special prefixes, I dont think pure
> >path access lets you access dictionary values of a script directly.
> >e.g. here/theScript/key does not work
> >
> >Another common approach is to call the python Script and
> >return a ZPT from it via
>
> OK; what's a ZPT and how would I use it?
>
> >return context.theZPT(arg1=foo,arg2=bar)
>
> Bob Gailer
> bgailer at alum.rpi.edu
> 303 442 2625
>




More information about the ZPT mailing list