Open terminal and write in it from python script

Hello everyone,
I am trying to use the python API CORE ( Common Open Research Emulator) to create a simulation. I am at the point that I want to open a terminal of a node and write some ubuntu terminal command from the python script. I am able to open the terminal, but once I start to write the command lines with os.system function in python, these commands are executed in other terminal ( the main terminal), I did not understand why.
How can I solve this problem?

Thanks a lot!

Sorry - what is a “node” in this context, and how exactly does the opened terminal belong to it?

It would be helpful to see the existing code for this task.

Node is a component of the emulator CORE. I already tried with some helpful, but they doesn’t work.

This is how I open a terminal:
gnome-terminal open --window – vcmd -c /tmp/pycore.2/NOC – /bin/bash &