By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,923 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,923 IT Pros & Developers. It's quick & easy.

How to launch another program from GUI button?

P: 30
hi all,

i wrote a simple GUI with 2 buttons. Button1 is to launch another program. Button2 is to run test. When I click Button1, it will launch another program. After launching the program, my GUI window is still waiting until i exit the program. How can the GUI window gain control after launching another program? i used os.system to launch the other program. pls help.

thanks
maximus
Jan 4 '11 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 624
After launching the program, my GUI window is still waiting until i exit the program. How can the GUI window gain control after launching another program?
What does this mean? Do you want to close the window after launching the program?
Jan 4 '11 #2

P: 30
hi,

from one python GUI script, i want to launch another program by clicking to a button. i used os.system but the GUI is waiting until the program launched is closed.

thanks
maximum
Jan 5 '11 #3

Expert 100+
P: 624
Most GUI's include a Destroy method http://www.wxpython.org/docs/api/wx....s.html#Destroy, so the function referenced/called when button1 is pressed, calls destroy() on the top/main window and then os.system().
Jan 5 '11 #4

P: 30
thanks for the advice. i'm using Tkinter but let me explore the link you gave me. currently it works by using os.popen command.
Jan 6 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.