I'm writing a program in Python3 with a Tkinter GUI.
I have included a terminal xterm in one of my frames:
Frame2 = Frame(master)
Frame2.place(x=self.anchoVentana,y=2*self.alto/3,width=self.ancho-self.anchoVentana,height=self.alto/4)
wid = Frame2.winfo_id()
proc = subprocess.Popen('xterm -into %d -geometry 500x100 -sb ' % wid,shell=True)
I want to be able to run on that terminal xterm simple bash statements like:
subprocess.run(["echo", "Hola"])
But this executes the bash statement in the terminal that is executing the program, not in the terminal that I have open and included in one of my GUI frames.
I can not find the way, how could I get it?