Message17717
Logged In: YES
user_id=1321088
I found the problem! :D
Around line 394 of PyShell.py roughly, this function:
def start_subprocess(self):
# spawning first avoids passing a listening socket
to the subprocess
self.spawn_subprocess()
#time.sleep(20) # test to simulate GUI not accepting
connection
addr = (LOCALHOST, self.port)
# Idle starts listening for connection on localhost
for i in range(3):
time.sleep(i)
try:
self.rpcclt = MyRPCClient(addr)
break
except socket.error, err:
pass
else:
self.display_port_binding_error()
return None
# Accept the connection from the Python execution server
self.rpcclt.listening_sock.settimeout(10)
try:
self.rpcclt.accept()
except socket.timeout, err:
self.display_no_subprocess_error()
return None
self.rpcclt.register("stdin", self.tkconsole)
self.rpcclt.register("stdout", self.tkconsole.stdout)
self.rpcclt.register("stderr", self.tkconsole.stderr)
self.rpcclt.register("flist", self.tkconsole.flist)
self.rpcclt.register("linecache", linecache)
self.rpcclt.register("interp", self)
self.transfer_path()
self.poll_subprocess()
return self.rpcclt
It spawns the subprocess, but never manages to talk to it.
The socket.timeout exception is raised. Communication to the
subprocess fails in here:
try:
self.rpcclt = MyRPCClient(addr)
break
except socket.error, err:
pass
Then, it tries to register the functions with tkconsole, and
TkInter seems to die. I haven't dug down into it yet to see
what exactly happens. But, I suspect that rpcclt is null
when self.rpcclt.register() is called.
So, it's not a Tk error. It's an error with trying to
contact the subprocess.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:16:00 | admin | link | issue786827 messages |
2007-08-23 14:16:00 | admin | create | |
|