Killing wxPython process in PythonWin

Gordon McMillan gmcm at hypernet.com
Wed Jun 14 09:35:08 EDT 2000


Mark Morrison wrote:

>When prototyping wxPython apps using PythonWin a crash sometimes leaves
>the wxApp class lying around (with main loop running). Next time I try
>to run the script, wxPython complains that only one wxApp can be
>running. Is there a simple way to kill the old running script without
>exiting PythonWin and killing the PythonWin process from the
>taskmanager?


I hate to tell you this, but except for very, very simple scripts, I never 
run anything from within Pythonwin or IDLE. If I do run from inside the 
IDE, (say, to use the debugger), I generally expect I'll have to exit and 
restart between runs. I've chased too many "bugs" (that were really fixed, 
but something wasn't reloaded) to trust anything but a fresh start. And I'm 
certainly not going to bother with the bizarre hacks people come up with 
(eg, to replace the "code" but not the data in "running" instances).

The cost to me is a ^G nnn (or ALT-G nnn in IDLE) to goto the line from the 
traceback. The value is complete certainty.

- Gordon




More information about the Python-list mailing list