Closed shruthijanakiram closed 6 years ago
Hi @shruthijanakiram ,
Can you please confirm the version of SDK you're using?
commcell.clients returns an instance of the Clients class
We added support for iterating over this object from SP12 branch.
You can either update to the latest version of the SDK or if you wish to use the SDK currently installed on your client, then you need to use the all_clients property from the clients object.
for client in commcell.clients.all_clients: print client
Great thanks for the quick response .
The above command is working fine. I have recently installed SP12.
Can I know the command to check the SP version?
You can either check using pip, or directly from the Python interpreter.
pip freeze | find "cvpysdk"
python
>>> import cvpysdk
>>> print(cvpysdk.__version__)
Closing the issue.
I have fetched client list in comserve using a python script. But I am getting the output in object format, due to which I am unable to iterate client one by one.
Script:
from cvpysdk.commcell import Commcell commcell = Commcell('comserve', 'username','password') clt = commcell.clients print clt
for i in clt: print "the Client is:",i
Error:
TypeError: 'Clients' object is not iterable