winIDEA SDK
test_is_attached.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8def test_isAttached():
9 connMgr = ic.ConnectionMgr()
10 cfg = ic.CConnectionConfig()
11 cfg.start_always()
12 print("Connecting...")
13 connMgr.connect(cfg)
14
15 print(f"\tIs attached: {connMgr.isAttached()}")
16
17 print("Disconnecting...")
18 connMgr.disconnect_close(bSaveAll=False)
19 print(f"\tIs attached: {connMgr.isAttached()}")
20
21
22if __name__ == "__main__":
23 test_isAttached()