[ZPT] call a script

Charlie Clark charlie at begeistert.org
Thu Sep 25 11:09:39 EDT 2003


On 2003-09-25 at 16:58:22 [+0200], Bob Gailer wrote:
> Can I use python: to call a script? I tried
> 
> tal:repeat="n python:container/get"
> 
> and get the error "global name get is not defined"

Hi Bob,

welcome to the world of ZPT. It's a bit different than Python-tutor...

one of the big "issues" for Pythoneers and ZPT is syntax. If you are going 
to use Python in TALES you need to use Python syntax, ie. python: 
container.get().

If you are going to pass parameters, you have to use python. You might like 
to use python: path(container/get), i.e. "path syntax" but I personally 
find this unacceptable. My own preference would be pure Python syntax in 
TALES but this would break with Zope conventions and we're too late anyway.

Charlie



More information about the ZPT mailing list