winIDEA SDK
Loading...
Searching...
No Matches
test_terminal_doc.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import os
import isystem.connect as ic
winidea_id = ''
def test_control():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
# This controller is deprecated. See example with CTerminalCtrl.
tDocCtrl = ic.CTerminalDocController(connMgr)
print("Terminal window created, controlling state...")
tDocCtrl.start()
tDocCtrl.reset()
tDocCtrl.stop()
filePath = os.path.join(os.getcwd(), "terminalContent.txt")
tDocCtrl.saveAs(filePath)
print(f"Content of the terminal window saved to: {filePath}")
tDocCtrl.close()
if __name__ == "__main__":
test_control()