Entry
What is the format of Osp.Result from Get() Set()
May 22nd, 2001 11:52
Engineer TCSI, PyOsp manpage
Osp.Result receives the result of an AO Get() or Set() request in PyOsp.
It takes each attr from the resulting getResList or setResList, and sets
them as members of Osp.Result. Therefore, you can easily access each
attribute value as:
>>> res = guido.Get('empId', 'lastName')
>>> id = res.empId
>>> name = res.lastName
The Osp.Result puts the attrs in a dictionary that you can iterate over:
>>> result = ao.Get()
>>> attrDict = result.Dict()
>>> attrNames = attrDict.keys()
>>> attrNames.sort()
>>> for attr in attrNames:
>>> print attr, "\t\t\t", attrDict[attr]