[ZPT] ZPT and Python Scripts
Bob Gailer
bgailer at alum.rpi.edu
Fri Sep 26 10:13:50 EDT 2003
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
-------------- next part --------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003
More information about the ZPT
mailing list