[Pythonmac-SIG] can't exit module

Chris Barker cbarker@jps.net
Fri, 08 Dec 2000 10:25:07 -0800


Jack Jansen wrote:

> You're right: sys.exit() doesn't work in the IDE. In the raw interpreter it
> works fine, and indeed exits the interpreter, but in the IDE it is unclear
> what it should do.
> 
> On the one hand exiting the IDE is a possible solution, and seems to be what
> you expected. On the other hand exiting may not be what you want: if you're
> running a script that was written for Unix (which doesn't have an IDE) calling
> sys.exit() will be the normal way of terminating the script, and you wouldn't
> want to terminate the IDE in that case.

ARRGG! once again, a problem arising from the fundamental flaw of the
IDE: it uses the same interpreter to run itself as the scripts you are
running. This means that you are forced to have different behavior
depending on whether a script is run from the IDE or not. This
continually is causing problems like this one. We really need a way to
run a script from the IDE and have it behave exactly like running it
from the raw interpreter.

I know, I know, this is free software... if you want something, stop
complaining and do it yourself. I only wish I knew enough about Mac
programming to make this anything short of a Major project for
me...maybe I will still do it someday.

I am I really the only one who thinks this is a problem?

-Chris


-- 
Christopher Barker,
Ph.D.                                                           
cbarker@jps.net                      ---           ---           ---
http://www.jps.net/cbarker          -----@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Water Resources Engineering       ------   @    ------   @   ------   @
Coastal and Fluvial Hydrodynamics -------      ---------     --------    
------------------------------------------------------------------------
------------------------------------------------------------------------