winIDEA SDK
test_connect.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2# (c) TASKING Germany GmbH, 2023
3#
4# This script shows recommended way to connect to specific version of winIDEA
5# at known location.
6
7import isystem.connect as ic
8import subprocess
9import time
10
11TIMEOUT_S = 15
12POLL_INTERVAL_S = 0.5
13
14
15def test_connect():
16 conn_mgr = ic.ConnectionMgr()
17 cfg = ic.CConnectionConfig()
18 cfg.start_always()
19
20 conn_mgr.connect(cfg)
21
22 if conn_mgr.isConnected():
23 print("Connected to winIDEA!")
24 else:
25 print("Could not connect to winIDEA in the specified time.")
26
27 conn_mgr.disconnect_close(bSaveAll=False)
28
29
30if __name__ == "__main__":
31 test_connect()