[Zope-DB] passing a returned value to a python script

Dieter Maurer dieter at handshake.de
Mon Jan 24 13:42:28 EST 2005


Martin Jennings wrote at 2005-1-24 14:40 +0100:
>Hello,
>
>I have managed to put together a page to display information retrieved
>from an Oracle DB. Now the problem I have is that I would like to
>format/modify this data using python.
>
>I have created a  Script (Python) for this, but have not been able to pass
>the returned value to the script.

"Script (Python)" behaves like a Python function.
You pass in information by passing arguments (like for any function).

In ZPT is looks like

   ...tal:define="python: myScript(pos_arg1, pos_arg2, kw_arg1=kw_val1, ...)"


You can also call the Z SQL Method directly in your script,
format the result as required and return a sequence of dicts.

-- 
Dieter


More information about the Zope-DB mailing list