[Zope] calling a python script from a dtml method

227709N@knotes.kodak.com 227709N@knotes.kodak.com
Tue, 13 Feb 2001 16:10:08 -0500


From: D Blanding

Hello-
I'm new to Zope... (have read the Zope Book) and have used Python.
For my first Zope project, I'm building a web application that stores and
retrieves stuff from the Z-Gadfly RDB. I have successfully written a python
script which calls a zsql method which selects all the records of my table.
(The table is not very big.) The python script then converts each record to
a list (adding a couple of fields and doing some arithmetic, etc.) then
appends all these lists together into one big list. The python script takes
no arguments.

Now I want to display the data in a table. So I plan to call the python
script from a dtml method which will present the data. But I don't know how
to do this. Can anyone give me advice on how to do this?

Also, once I succeed in calling the python script, I'm not sure how I will
parse a list of lists in dtml. I have seen examples using:

<dtml-in>
    <dtml-sequence-item>
</dtml-in>

to parse lists but how do I read through a list of lists?

Doug Blanding
doug.blanding@kodak.com