<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In the attached  <a href="http://www.nabble.com/file/p24726902/test.py" target="_blank">http://www.nabble.com/file/p24726902/test.py</a> test.py code,<br>


it appears that additional statements execute after the call to sys.exit(0).<br>
I'll be grateful if anyone can shed light on why this is happening.  Below<br>
is a copy of some sample I/O.  Note that in the last case I get additional<br>
output after what should be the final error message.<br></blockquote><div><br></div><div>A bare "except:" catches ALL exceptions; including SystemExit which is generated by sys.exit. And KeyboardInterrupt, too. That's why its basically a bad idea to use bare excepts unless you really, really, really need to. Try 'except Exception' instead. SystemExit and such do not inherit from Exception.</div>

<div><br></div><div>--S </div></div>