[Pythonmac-SIG] can't exit module

Christopher Barker cbarker@jps.net
Mon, 11 Dec 2000 15:28:20 +0000


Jack Jansen wrote:

> All that said I think there's definitely a good reason to have IDE
> optionally use an external interpreter to do the actual work, but it
> is just such an incredible amount of work to do it right.

I figured that. If it weren't, someone would have done it by now.

> Not only do
> you want stdin/stdout/stderr to be routed correctly, but you'll also
> need stubs in the work-interpreter to allow the debugger and the
> browser to work, etc. And the machinery needed to implement all this
> in the work-interpreter may well have such an impact that you still
> can't really run Tkinter scripts:-(

Just wrote:
> A new Python process on the Mac takes quite a bit of time: one of the fun
> parts of a Python IDE is that code is executed instantly.

would it be possible for the interpreter to "reset" itself, so that you
could start from scratch without having to actually restart the
interpreter? I suppose there would be issues with dynamically loaded
modules...



> You'd lose that
> with a separate process. Another thing that's less convenient (if it's
> possible at all) with a separate process is executing snippets of scripts
> or modules. It saves a lot of time: you can reload individual functions and
> methods, update module globals, update the behavior of live objects, etc. 
> Of course, a separate process is simply neccesary when you're dealing with
> event loops. But unfortunately it is more difficult to implement than it
> looks, and then there's the problem that _I_ don't really need it...

I think this is the big issue: different people use the IDE differently.
It works well for the way Just likes to work. Personally, I mostly write
short programs that do things like translate text files and such. I
hardly ever use any of the nifty features mentioned above, If I did, I
would parably think it was well worth the small annoyances that the
current approach has.

It is clear from what Jack wrote that doing it "right" would be a major
effort, but would it be nearly as big an effort to add a "run with raw
interpretter" option. I would personally be happy to have that, even if
I lost the debugger, browser, and some of the interactivity the user
would get a  choice as to how s/he wanted it to run.

Another bonus to adding a "restart" event to the interpreter would be
that it would be much easier to use it from other editors.

-Chris

-- 

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