Hello,
I have two buttons, OnLaunch and OnKill. The OnConnect function is as follows:
def OnLaunch(self,event):
child1 = subprocess.Popen(["./gnome-terminal"],cwd="/usr/bin")
t = child1.pid
return t
time.sleep(3)
child2 = subprocess.Popen(["./xterm"], cwd="/usr/bin")
z = child2.pid
return z
Now on My OnKill function:
def OnKill(self,event):
os.kill(self.OnLaunch('pid'),15)
os.kill(self.OnLaunch('pid'),15)
self.Close()
I am trying to kill those process only when I push kill button.
the way I have it it launches to instances of gnome-terminal and xterm. I just want to pass the process pid's to kill function so I can kill process. I know in C I could use a pointer to accomplish this. Thanks in advance.