soap request includes a hyphenated field, don't know how to set it
Justin Ezequiel
justin.mailinglists at gmail.com
Fri Mar 27 04:15:50 EDT 2009
On Mar 27, 3:33 pm, straycat... at yahoo.com wrote:
> Working my way through suds, I have something like this:
>
> >>> event = client.factory.create('ns0:UserVerifiedEvent')
> >>> print event
>
> (UserVerifiedEvent){
> event-id = None
> user-verified-content[] = <empty>
> domain-specific-attributes =
> (MediaAttributes){
> domain-attribute[] = <empty>
> }
> }
> >>> event.event-id = "164-251340-2009-03-12"
>
> SyntaxError: can't assign to operator
>
> Any ideas or python magic to get around this hyphen problem (and I
> can't change that to event_id or the server won't recognize it.)
>
> Thanks,
> Matthew
haven't tried suds but perhaps you can try
setattr(event, "event-id", "164-251340-2009-03-12")
More information about the Python-list
mailing list