Modify the remote stack viewer to work in the threaded subprocess.

M PyShell.py
M run.py
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 @@
         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 @@
     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",), {})