[Zope] Accessing ZSQL result object contents via python:repeat

Andreas Jung andreas at andreas-jung.com
Sun Oct 26 16:18:54 EST 2003


for row in zsqlmethod(someargs):
   print row.col1
   print row.col2

-aj

--On Sonntag, 26. Oktober 2003 18:12 Uhr -0300 andrew cooke 
<andrew at acooke.org> wrote:

>
> I have an ZSQL result, which I am iterating over using tal:repeat.  I can
> access the column values using tal syntax like item/col1 and item/col2.
> But how do I access thes values via Python?  I've tried
> python:repeat['item'].col1, python:repeat['item'].col1(), and
> python:repeat['item']['col1'], but none of those work.  What's the magic
> recipe?
>
> Thanks,
> Andrew







More information about the Zope mailing list