swat.CAS.__iter__

CAS.__iter__(self)

Iterate over responses from CAS

If you used the invoke() method to call a CAS action, the responses from the server are not automatically retrieved. You will need to pull them down manually. Iterating over the CAS connection object after calling invoke() will pull responses down until they have been exhausted.

Yields
CASResponse object

See also

invoke()

Calls a CAS action without retrieving results

retrieve()

Calls a CAS action and retrieves results

Examples

>>> conn = swat.CAS()
>>> conn.invoke('serverstatus')
>>> for resp in conn:
...     for k, v in resp:
...        print(k, v)