How to know that a second application has finished?
Suchandra Thapa
ssthapa at classes.cs.uchicago.edu
Tue Dec 18 12:13:43 EST 2001
Enrique <ecastro at cicei.ulpgc.es> wrote:
> Let me put my question again, in a different and more
>general form. I have a Python program that launches a GUI
>application in a separate window via COM. I am using Python
>2.1.1 with win32 extensions in MS-Windows (win95/98/NT)
>
>Is it possible to suspend the main Python program until the
>COM application has finished? (has been closed).
>I want to resume from that point onwards. How the main
>program gets information of the state of other applications
>launched from it?
I'm not sure about COM but on unix one way to do this would
be to do a os.fork(), followed by a os.wait. On windows I believe
you could do something like os.spawnv with the P_WAIT flag. Instead
of spawning the application directly, maybe you could spawn another
python script that then controls the GUI app using COM.
--
----------------------------------------------------------------------------
|
Suchandra Thapa | "There are only two kinds of math .
s-thapa-11 at NOSPAMalumni.uchicago.edu | books. Those you cannot read beyond
| the first sentence, and those you
| can not read beyond the first page."
| -C.N. Yang
----------------------------------------------------------------------------
More information about the Python-list
mailing list