[Zope-dev] How to invoke a Z SQL method from python

Jim Penny jpenny@universal-fasteners.com
Fri, 3 Sep 1999 11:44:31 -0400


Hi, I have to model some legacy forms.  They are tricky enough and
the user's picky enough that I am not going to be able to use HTML
as the source language.  So I want to drop to TeX.

I have tucked the data for the form away in an external database.
How do I execute a query against a ZSQL method from python.

In particular, I have a ZSQL method sql_test, that has a single
argument request_number.  Mucking about in python, I can see by
program 
def test(self, request_number):
        return request_number, dir(self.sql_test):
that sql_test has structure:
['__ac_local_roles__', '_arg', '_col', '_v_brain', '_v_cache', 
'arguments_src', 'connection_id', 'id', 'src', 'template', 'title'] 

But, I don't see anything in sight that actually causes the query
to be invoked.  

Could someone give an example, or point me to the general area of the
source code in which a ZSQL method is invoked?

Thanks.
Jim Penny