On 5/10/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > That is because it is no hash - AFAIK SOAP doesn't support hashes (or > dicts, in python-lingo) out of the box. What you see above essentially a > named tuple. Conceptionally like this: > > class MyStruct: > > def __init__(self, foo, bar): > self.foo = foo > self.bar = bar > > > Either you access the individual values by name - or maybe there is a > way to enumerate the names for you, but that depends on what the > SOAPpy.Types.structType is capable of. I suggest you look at it's source.
IIRC, SOAPpy's structType has a _keys() function - so somethign like the following (untested) might work: struct_as_a_dict = dict((key, getattr(struct, key)) for key in struct._keys()) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list