[Tutor] Executing more than one program at a time
Wed Apr 9 13:11:01 2003
(I seem to be having some trouble with my mailer. If this arrives
multiple times, please disregard the extras.)
Henry Steigerwaldt wrote:
>How does one execute more than one program at a
>time in Python?
>Within my program, I display a canvas, but then when
>I try to start a Windows program from within this
>program, nothing happens. It is as if the computer is
>still fixed on the canvas that is displayed and can't do
It's hard to say without looking at your code, exactly what is
happening. Is your canvas window responding to appropriate events?
Where in your code are you trying to start this other program?
One possibility that occurs to me is that you may be starting the
GUI's message loop, and then trying to launch the other program
*after* you start the message loop, in that same segment of code.
This won't work, because when you start a message loop, your program
remains inside of that loop until it shuts down. You can either start
the outside program (using os.popen() or os.system("start ..."),
depending on your exact needs) before you enter the message loop, or
from some event handler (which will be called from inside the message
If this doesn't help, feel free to post a short bit of code that
illustrates what's happening.