I made a GUI using python. Now in the GUI i created a button which when clicked should launch an application(in my case it's MEDINA Pre-processor). i've used subprocess module in the callback function of the button but the application was not getting launched.
I'm using python2.7 and linux CENT OS.
How can i do this? the code is as follows:
#!/usr/bin/python
import Tkinter as tk
import subprocess
class StageGui:
def __init__(self,parent):
self.f = tk.Frame(main, width=300, height=300)
self.b1=tk.Button(main,text='Start Medina',command=startmedina).pack(side='left',anchor='nw')
self.b2=tk.Button(main,text='Quit Medina',command=quitmedina).pack(side='left',anchor='nw')
self.xf = tk.Frame(self.f,relief='groove', borderwidth=2)
def startmedina():
subprocess.call(['prexx'],shell=True)
return
def quitmedina():
return
main = tk.Tk()
stagegui=StageGui(main)
main.title('prototype')
main.mainloop()