Re: How to use a ZSQLMethod from a Python Script
Hello under zope 2.5.1, I have a folder called temp. In the folder I have a connection object, a zsql method called test_sql and a python script called test_zsql. The script is: from Products.PythonScripts.standard import html_quote res = context.test_sql() for name in res.names(): print name dict = res.data_dictionary() for key in dict.keys(): print dict[key] return printed Works good. Sure you do not have some other issues? Note that I run under Linux and as far as I can see you run it under Windows. regards Stefano On Friday 03 May 2002 13:47, zope-request@zope.org wrote:
Igor Leturia writes:
I want to call a ZSQLMethod from a Python Script. In Zope.org, I > couldn't find a specific how-to on the subject, but accidentally I found some other how-to's in which there are examples that use ZSQLMethods > from Python scripts. It seemed very easy, so I tried it that way: res = context.mysqlmethod() It gives an error message, 'resource not found'.
Igor Leturia writes:
I want to call a ZSQLMethod from a Python Script. In Zope.org, I > couldn't find a specific how-to on the subject, but accidentally I found some other how-to's in which there are examples that use ZSQLMethods > from Python scripts. It seemed very easy, so I tried it that way: res = context.mysqlmethod() It gives an error message, 'resource not found'.
http://www.zope.org/Members/spinwing/ZSQL_Results ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
participants (2)
-
hans -
Stefano Vedovelli