I have a python simulator file sim.py. I need to start, stop and restart this simulator from a C/C++ test file test.cpp. I tried using system( "\sim.py" ) in my test file. This starts the simulator but in the same window as test.exe. In this case how do i close the simulator alone when i want to and continue with the test? Also is it possible to open this simulator in a separate window and close it later? Please help.