title: able to select a button in python based gui when a process is running
body: <p>i am new to python,i have been tying to run a executable file using python tkinter, by pressing a button the executable will run using os.system and stopping it by pressing another button i have written a c code to stop the executable using kill command and running the executable in the python gui ,but once the process runs am unable to click the other button.how to stop it,i have pasted my code below, kindly help me to solve this</p>
  
  <pre><code>from Tkinter import * 
  import os
  import sys
  
  def init():
      os.system('./a.out')
  
  
  def lena():
      os.system('./test')
  
  WINDOW_W = 300
  WINDOW_H = 80
  
  def createDisplay():
   global tk
   global btn
   # create the tk window - within which
   # everything else will be built.
   tk = Tk()
    #Add a canvas area ready for drawing on
   canvas = Canvas(tk, width=WINDOW_W, height=WINDOW_H)
   canvas.pack()
   #Add an exit button
   btn = Button(tk, text="lena", command=lena)
   btn.pack()
  
   btn1 = Button(tk, text="optimist", command=lambda:os.system('./optimist'))
   btn1.pack()
   btn2 = Button(tk, text="text",command=init)
   btn2.pack()
   btn3 = Button(tk, text="exit", command=terminate)
   btn3.pack()
   # Start the tk main-loop (this updates the tk display)
   tk.mainloop()
  
  def terminate():
   global tk
   tk.destroy()
  
  def main():
   createDisplay()
  
  if __name__ == '__main__':
   main()
  </code></pre>