[Zope] returning list from PythonScript

J Cameron Cooper zope-l at jcameroncooper.com
Fri Jan 20 17:54:38 EST 2006


Slobodan Jovcic wrote:
> Hi,
> 
> I'm trying to pass a list of values between the script and external  
> method. ZPT contains the following:
> 
> <tal:block tal:define="whatever python: container.myExtMethod ( 
> container.myScript() )" />
> 
> container.myScript() is a Python Script that returns a list of values.
> container.myExtMethod() is an External Method expecting that list.  
> However, all it gets is a string representation of the list ( "[]"  
> instead of [] ). How can I pass the list itself?
> 
> Btw, hard-coding list in ZPT works fine:
> <tal:block tal:define="whatever python: container.myExtMethod( ['a',  
> 'b', 'c' ] )" />

The problem is likely in 'myScript', which you do not show us.

		--jcc
-- 
"Building Websites with Plone"
http://plonebook.packtpub.com


More information about the Zope mailing list