PDA

View Full Version : PyGTK help running / closing an application



Srbjan
April 21st, 2010, 12:17 PM
If you can launch an application like this


import os

def wn1_btn1_clicked(self, widget):
os.system("python /path/App.pyc")

Can you kill the same application in a similar method or let say other application "wine /path/to.exe"

giuspen
April 21st, 2010, 12:46 PM
If you can launch an application like this


import os

def wn1_btn1_clicked(self, widget):
os.system("python /path/App.pyc")

Can you kill the same application in a similar method or let say other application "wine /path/to.exe"

you can probably do it using the subprocess module:

http://docs.python.org/library/subprocess.html