5import isystem.connect
as ic
9def test_startNewInstance():
10 print(
"Starting new instance with ID: 'startNewInstanceExample'...")
11 connMgr = ic.ConnectionMgr()
12 cfg1 = ic.CConnectionConfig()
13 cfg1.instanceId(
"sdk_example")
14 cfg1.cmdLineParams(
"/LOG:6")
15 connMgr.connect(cfg1.start_always())
16 port = cfg1.getTCPPort()
17 print(f
"\tInstance created, port: {port}")
18 connMgr.disconnect_keep()
20 cfg2 = ic.CConnectionConfig()
21 cfg2.processTCPPort(port)
23 connMgr.disconnect_keep()
25 print(f
'\tWinIDEA is connected: {connMgr.isConnected()}.')
26 connMgr.disconnect_close(
False)
29if __name__ ==
"__main__":
30 test_startNewInstance()