This frequently-asked question appears, for example, in [http://groups.google.com/group/comp.lang.python/msg/7edd2c4b0c7fe185 this Usenet posting]. No single answer is canonical; there are, however, a number of expedients which apply in at least some situations:
- "fire and forget", that is, put the subprocess in the background and let it run freely;
- put the subprocess in the background, return to the GUI's event loop, and poll to detect when the subprocess has terminated;
- put the subprocess in its own thread, and rely on Python thread management ...;
- ...
- the particular GUI framework involved--wxPython, tkinter, ...
- ...
[links, explanations, warnings]