5import isystem.connect
as ic
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 optCtrl = ic.COptionController(connMgr,
"/IDE/System.Debug.Applications")
17 index = optCtrl.index_of(
"Name",
"App")
18 print(f
"Index of the item whose 'Name' attribute has value 'App': {index}")
20 index = optCtrl.index_of(
"Name",
"x")
21 print(f
"Index of the item whose 'Name' attribute has value 'x' (-1 = does not exist): {index}")
24 optCtrl.index_of(
"xzy",
"App")
25 except Exception
as err:
26 print(f
"Attribute name must be correct, otherwise exception is raised: 'xzy':\n{err}")
29if __name__ ==
"__main__":