1
2
3
4
5
6
7
8import isystem.connect as ic
9
10
11winidea_id = ''
12
13
14def test_hotAttachDetach():
15 connMgr = ic.ConnectionMgr()
16 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
17
18 execCtrl = ic.CExecutionController(connMgr)
19
20 sess_ctrl = ic.CSessionCtrl(connMgr)
21 sess_ctrl.begin_prepare()
22
23 if execCtrl.hotDetach() == 0:
24 print(f"Hot detach succeeded, winIDEA is in `detached` state.")
25
26 if execCtrl.hotAttach() == 0:
27 print(f"Hot attach succeeded, winIDEA is connected.")
28
29 execCtrl.stop()
30
31
32if __name__ == "__main__":
33 test_hotAttachDetach()