[Tutor] GUI die when execute sys.exit()

alan.gauld@bt.com alan.gauld@bt.com
Thu, 28 Jun 2001 12:03:29 +0100


> When I run it and click the button, the gui die and I got the 
> following message:
> 
>  >>> Unhandled exception while debugging...
> Traceback (most recent call last):
>    File "C:\PP2ndEd\Examples\PP2E\Gui\Intro\gui3c.py", line 9, in quit
>      import sys; sys.exit()              # retains the self+quit pair
> SystemExit
> 
> I am using Pythonwin IDE from ActiveStates and windows 2000. 

ISTR thats correct behaviour from Pythonwin - it catches SystemExit 
errors so that the IDE doesn't shut down, just the program you are 
running. If you run your script from a Command window(aka DOS box) it 
should work just fine.

Alan G