[Pythonmac-SIG] sys.exit() functionality
Jon Bradley
jbradley@thinqinteractive.com
Wed, 30 Jan 2002 10:17:52 -0500
> From: Jack Jansen <jack@oratrix.com>
>
> Sounds reasonable. How about a routine PyMac_SetExitFunc() that you
> could call to set your own exit function, (similar to
> PyMac_SetConsoleHandler())? MacPython would then do all it's normal
> cleanup, but at the very end call your routine in stead of exit().
> --
> - Jack Jansen <Jack.Jansen@oratrix.com>
:) That does sound good. Now - the main question is, would calling that
function end up exiting the interpreter as well? Er, what I mean is, does
the normal cleanup of MacPython affect the interpreter or does it only
affect the application that calls it? The thought is that people could
write applications in Python that easily run over the host, but exiting
would only exit the actual Python application, leaving the interpreter still
active and the application intact.
I think I need to spend some more time learning the inner workings of the
sys functionality in Python (obviously).
Jon