[Zope] marshalling list arguments

Cornel Nitu c.nitu@finsiel.ro
Tue, 4 Feb 2003 12:06:25 +0200


Hi,
You can try this:

## Script (Python) "xxxx"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=list_argument
##title=
##
s=''
for item in list_argument:
 s+='list_argument:list=%s&' % (item)
s=s[:-1]
context.REQUEST.RESPONSE.redirect('index_html?%s' % (s))





----- Original Message -----
From: "Eugen Nedelcu" <eugen@sifolt.ro>
To: <zope@zope.org>
Sent: Tuesday, February 04, 2003 11:37 AM
Subject: [Zope] marshalling list arguments


> Hi,
>
> I have this python script:
>
> ## Script (Python) "edit_wrapper"
> ##bind container=container
> ##bind context=context
> ##bind namespace=
> ##bind script=script
> ##bind subpath=traverse_subpath
> ##parameters=list_argument
> ##title=
> ##
>
> REQUEST.RESPONSE.redirect('edit_records?list_argument=%s' %
> list_argument)
>
>
> When I try to use list_argument in edit_records I find that is not
> a list as it should be. In the python script it is a list but when
> is passed to edit_records it becomes a string.
> I've tried to pass the argument like list_argument:list but that is
> rendered in edit_records like ["[.....]"](a list with one string element).
>
> Any help is welcomed. TNX.
>
> --
> ICQ: 165549179
>
> _______________________________________________
> 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 )
>