[Idle-dev] Remote execution for IDLE

David Scherer dscherer@cmu.edu
Mon, 13 Mar 2000 22:24:04 -0500


> I haven't looked at Dave's code closely yet, but I imagine that a
> third alternative is to have each IDLE process start up its own
> execution engine subprocesses.  The port number can be chosen by the
> parent process and passed to the child as an argument.

This is clearly the best approach for the multi-user situation on Unix, and
quite easy to add to my code, though I don't have time to do it myself at
the moment.  It has the added advantage of not depending on the availability
of a specific high port number :)

The main reason I chose a "well-known port" to begin with is that I wanted
proof-of-concept that command-line arguments are not necessary.  I am
looking ahead to the Macintosh, where it is *not possible* to have more than
one process running from the same binary, and "command line arguments" don't
exist in the normal sense.  The only way I know of to start the loader on
the Mac is to make a physical copy of the Python interpreter on disk, change
its signature, change the signature of loader.py to match, and then launch()
loader.py.  And I thought having to call waitpid() on UNIX sucked...

Of course, MacPython is also only beginning to grow thread support, and has
a  buggy Tkinter implementation, and we haven't even managed to build a
working _tkinter.slb to start hacking up :(

I note that having only one IDLE running per user is desirable in any case,
because it enables much smarter behavior (e.g. preventing conflicting edits
of the same file).  Figuring out when to do the "remote" thing on UNIX might
be tricky, but at least on Windows I would like to protect the novice who
reasons that if they opened their first IDLE window by double-clicking the
IDLE icon, they should open a second window in the same way.

Dave