Differences between revisions 1 and 2
Revision 1 as of 2008-08-31 16:23:19
Size: 648
Editor: CameronLaird
Comment:
Revision 2 as of 2008-08-31 16:24:44
Size: 689
Editor: CameronLaird
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 *  * ...
Line 8: Line 8:
 *  * ...

[links, explanations, warnings]

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]

How do I keep a GUI alive during a long-running subprocess? (last edited 2008-11-15 14:00:04 by localhost)

Unable to edit the page? See the FrontPage for instructions.