[Idle-dev] Re: Anticipated changes for Mac OS X

Michael Williams michael.williams@st-annes.oxford.ac.uk
Wed, 4 Dec 2002 15:15:13 +0000 (GMT)


Further testing has yielded some more information and some more queries about
the changes since 0.8.1...

> Here's the output after the first user (willmsmj) runs it:
[snip]

> Recall guest1 sees idle on his own display (after a long wait), and can use it
> normally (or as far as I've tested normal use). This is in contrast to IDLEfork
> 0.8.1, which would launch a new (shell I think) window on the first user's
> display when a second user ran it. So we're half way there!

Less than half way, actually! I tried using the second users IDLE 
window (which I should have tried anyway). stdout for this IDLE shell appears
to be the terminal from which it was launched on the second users desktop. It 
should be to the IDLE shell, a la:

>>> print "hello"
hello

Note the first user's IDLE shell appears to function as normal.

The second user is unable to run stuff from the editor window at all. They get 
the following error in the terminal from which they launched IDLE:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1292, in __call__
    return apply(self.func, args)
  File "/tmp/idle/ScriptBinding.py", line 114, in run_script_event
    interp.restart_subprocess()
  File "./PyShell.py", line 327, in restart_subprocess
    self.rpcclt.close()
AttributeError: 'NoneType' object has no attribute 'close'

Perhaps this sheds more light on the situation.

-----

On the subject of insisting on saving files edited in the editor window before 
their first run, I note CVS now says: "you've not saved the contents of the 
buffer". From a teaching point of view this is good; it gets our students into
a good habit from the get-go. (and it gets rid of the relative path file writing
problem I mentioned).

-----

However, I'm curious to know why the output of a module is directed to the 
Shell rather than an Output window as it was in IDLEfork 0.8.1. I worry that
directing it to the Shell will confuse students already struggling to deal
with the distinction between interactive and scripted programs. I'd like to
see the Output window return!

-- 
Michael