[Zope] python script parameters
Ben Avery
ben@thesite.org
Mon, 12 Aug 2002 17:52:20 +0100
hi,
I'm having problems with passing a number of parameters to a python
script called by XML-RPC.
I want some of the parameters to be optional, and passed as empty
strings. I have tried to do this by setting default values as empty
quoted strings. But playing around even with setting non-empty default
values in a list of params doesn't seem to work.
e.g.
if I set the parameter list of the method as: a, b="aardvark"
and then test the script, if I leave b empty, the default aardvark is
assumed.
but if I switch the order round, and set the param list as: b="aardvark", a
and do the same, the script breaks with the error 'the parameter b was
ommited from request.
could anyone tell me how I do this: i.e. have a parameter list with some
values set with defaults, not just the last one?
TIA
Ben Avery
YouthNet UK
www.thesite.org