summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-06-02 01:50:19 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-06-02 01:50:19 (GMT)
commit9f3660972003dddcc1cced41934488513e277220 (patch)
tree15b13d1cc739814069bdd6ede8d252406585a7f0 /Lib/idlelib/PyShell.py
parent5da131b2df84d0b91fbce739eba46ad170188d5e (diff)
downloadcpython-9f3660972003dddcc1cced41934488513e277220.zip
cpython-9f3660972003dddcc1cced41934488513e277220.tar.gz
cpython-9f3660972003dddcc1cced41934488513e277220.tar.bz2
Modify the remote stack viewer to work in the threaded subprocess.
M PyShell.py M run.py
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index a11eaa5..db4a05b 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -357,6 +357,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
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()
@@ -480,6 +481,19 @@ class ModifiedInterpreter(InteractiveInterpreter):
def getdebugger(self):
return self.debugger
+ def open_remote_stack_viewer(self):
+ """Initiate the remote stack viewer from a separate thread.
+
+ This method is called from the subprocess, and by returning from this
+ method we allow the subprocess to unblock. After a bit the shell
+ requests the subprocess to open the remote stack viewer which returns a
+ static object looking at the last exceptiopn. It is queried through
+ the RPC mechanism.
+
+ """
+ self.tkconsole.text.after(300, self.remote_stack_viewer)
+ return
+
def remote_stack_viewer(self):
import RemoteObjectBrowser
oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {})