[Zope] Help with unconsistent behavior of parameter passing to Python Scripts.
Rudi Wurm
net_seeker@web.de
Sat, 13 Apr 2002 10:55:37 +0200
On Saturday 13 April 2002 00:40, you wrote:
...
> The script at mypythonscript indeed receives a list, but it does not
> know that the elements of this list are in turn other lists. The
> questions that come up then are:
<
> 1.- Why it works with plain python and does not with Zope
> 2.- How to make it work with zope by indicating that the passed value is
> a "list of lists"
>
> Hope this clears things a bit. Any help is greatly appreciated. Thanks
> in advance.
ok, i did some low-level testing for you, hope it helps abit.
one zope-python-script:
# script param-call in pyth-folder
# ... some zope-init stuff ...
# no parameters
return context.pyth.param_test([0],[[1],[0]])
which calls this one:
# script param-test in pyth-folder
# ... some zope-init stuff ...
# parameters list and listlist
l = []
return str(same_type(l, list)) + str(same_type(l, listlist[0]))
result is 11, list and first element of listlist are both of type "list".
so python inside zope works like expected. your problem can ONLY be
in parameter-passing to your script. You maybe should leave the parameters as
strings and convert them to list by hand in your script or so.
> Felipe Barousse
Torsten