Call and launch an application in background from python GUI -


I have created a GUI using the python Now I have created a button in the GUI, on which an application is clicked on Launch should be done (in my case this is a pre-processor Medina). I used the subprocess module in the callback function of the button but the application is not being launched.

I am using Python 2.7 and Linux CNT OS.

How do I do this? The code is as follows:

#! / Usr / bin / python import vaccine imported as sub-publication class Tkinter stages: def __init __ (self, parent): self.f = tk.frame (main, width = 300, height = 300) self.b1 = tk Button (main, text = 'start medina', command = startmedia). Pack (side = 'left', anchor = 'nw') self.b2 = tk Button (main, text = 'leave medina', command = dropout). Pack (side = 'left', anchor = 'nw') self.xf = tk.frame (self.f, relief = 'drain', border width = 2) def startmedia (): subprocrioal (['preix'], Shell = True) Reform Def Tetemedia (): Return Chief = Vaccines Vaccine (Stage) = Stage (Main) Menitel ('prototype') Main.mainloop ()


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -