[ZPT] Namespaces and calling PythonScript from ZPT

Joel Burton joel@joelburton.com
Mon, 4 Mar 2002 15:47:56 -0500 (EST)


On Mon, 4 Mar 2002, Chris Withers wrote:

> Hi,
>
> If have something like:
>
> <td tal:define="mything some_script_or_something"
>     tal:content="here/myPythonScript">
> </td>
>
> ...how can I get hold of mything inside myPythonScript other than doing the horrible
> nasty:
>
> <td tal:define="mything some_script_or_something"
>     tal:content="python: here.myPythonScript(mything=mything)">
> </td>

tal:content="python: here.myPythonScript(here.mything())"

(as long as mything() is callable; if it's a property, get rid of the
parens.

-- 

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant