[Zope] How to call a python script within a Z-SQL method?

J. Cameron Cooper jccooper at jcameroncooper.com
Wed Nov 26 13:23:09 EST 2003


Julian Clark wrote:

>I'm trying to pass a result (or column of results) to a python script,
>within an SQL query.
>
>...
>
>where I'm wanting entry_date to be passed to a python script (and have the
>result returned as part of the sql query)
>
>How Can I do something like this?
>*****************************
>SELECT
>dealer_no,
>COUNT(mobile_no) as connects,
><dtml-call to_month(entry_date)>
>FROM
>connects
>WHERE
>entry_date >= #2003/11/20#
>GROUP BY
>dealer_no,
>entry_date
>*****************************
>
>###to_month
>return input.mm()
>  
>
Sort of. If you read the DTML specs, you will see that dtml-call returns 
nothing, but dtml-var does.

          --jcc

-- 
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."





More information about the Zope mailing list