[Zope] Newbie questions: Calling PageTemplates from Python, and getting meta-info on ZSQL method results

Leeuw van der, Tim tim.leeuwvander@nl.unisys.com
Thu, 8 Aug 2002 08:45:31 -0500


Hi,

I've got a couple of newbie-questions.

1. I want to call a PageTemplate from a Python script, and pass in
parameters. How can I access those parameters in the PageTemplate?

2. How can I find out the fields which are in the resultset of a ZSQL
method, using either Python or PageTemplates?

I do: SELECT * FROM employees. I know that the table employees contains the
fields emp_id, first, last, salary so I can code for it. But it would be
nices and more generic if I could infer from the resultset itself what
fields it has, and to extract them dynamically instead of coded into the
PageTemplate. That way I could make a generic PageTemplate that works for
any ZSQL method result.


3. How do I install the MySQLdb driver on Win2k? The installer only finds my
Python21 installation, and not my Zope installation and it doesn't give me
the option to enter a directory manually. I don't have MSVC++ compilers
installed, only gcc from cygwin, so I don't think that compiling it myself
will work. Any hints from anyone?


With thanks,

--Tim