import isystem.connect as ic
import subprocess
import time
TIMEOUT_S = 15
POLL_INTERVAL_S = 0.5
def test_connect():
conn_mgr = ic.ConnectionMgr()
cfg = ic.CConnectionConfig()
cfg.start_always()
conn_mgr.connect(cfg)
if conn_mgr.isConnected():
print("Connected to winIDEA!")
else:
print("Could not connect to winIDEA in the specified time.")
conn_mgr.disconnect_close(bSaveAll=False)
if __name__ == "__main__":
test_connect()