[ZPatterns] simple python script <-> skinscript interaction question

Rob Miller ra@burningman.com
Fri, 27 Dec 2002 15:23:37 -0800


Hi there,

I'm currently a bit stumped by what I think is a very simple issue.  I'm 
populating the attributes of a DataSkin object using both ZSQL Methods 
and Python Scripts that are in the corresponding Rack.  I can populate 
several attibutes at one time by using a ZSQL Method and the "WITH QUERY 
sql_methodname COMPUTE attr1, attr2, attr3" SkinScript idiom.  I can 
also populate a single attribute by using a Python Script and the "WITH 
py_methodname COMPUTE attr4=RESULT" SkinScript idiom.

What I can't do, however, is figure out how to return several attributes 
at once using Python Scripts.  I've tried returning dictionaries, I've 
tried return namespaces (i.e. using Zope's "_(dictionary)" syntax), I've 
tried every combination conceivable of using (or not) the "QUERY" 
modifier in the SkinScript statement, but I can't seem to get it to 
work, nor can I find anything enlightening in docs or mailing list archive.

Can someone tell me what I need to do to get "WITH py_methodname 
COMPUTER attr1, attr2, attr3" to work?

thanks!

-r