That doesn't half complicate what is a really simple thing. # script python context.aaa(a=1,b=2) # zpt <span tal:replace="options/a"/> <span tal:replace="options/b"/> Bottom line is that any 'parameters' to a zpt are put into the options dictionary. Simple eh? Phil --On 08 November 2003 22:45 +0000 Lee Harr <missive@hotmail.com> wrote:
My problem is this: How can I, from a python script, pass a result set which has been returned from a ZSQL method, on to a ZPT
How about this...
# script (python) aaa = context.aaa # a zpt
foo = [1, 2, 3, 4, 5] # could be sql result
req = context.REQUEST req.set('foo', foo)
return aaa(REQUEST=req) ###
Then in the zpt:
<span tal:replace="request/foo">foo goes here</span>
_________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )