In this question I asked about creating a new terminal and start another python program int it from a python program and managed to do it. In the answer I accepted I was told, that
subprocess.Popen(["xterm", "python"])
would open a new terminal window and start the python interpreter in it.
How can I send commands to that window so that "magically" there can appear any python code to be processed py the interpreter?