Run on a terminal other than the one that executes the Python script


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),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:["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?

asked by Universal_learner 14.11.2018 в 11:35

0 answers