Пример #1
0
 def stackviewer(self, flist_oid=None):
     if self.usr_exc_info:
         typ, val, tb = self.usr_exc_info
     else:
         return None
     flist = None
     if flist_oid is not None:
         flist = self.rpchandler.get_remote_proxy(flist_oid)
     while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]:
         tb = tb.tb_next
     sys.last_type = typ
     sys.last_value = val
     item = StackViewer.StackTreeItem(flist, tb)
     return RemoteObjectBrowser.remote_object_tree_item(item)
Пример #2
0
 def stackviewer(self, flist_oid=None):
     if self.usr_exc_info:
         typ, val, tb = self.usr_exc_info
     else:
         return None
     flist = None
     if flist_oid is not None:
         flist = self.rpchandler.get_remote_proxy(flist_oid)
     while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]:
         tb = tb.tb_next
     sys.last_type = typ
     sys.last_value = val
     item = StackViewer.StackTreeItem(flist, tb)
     return RemoteObjectBrowser.remote_object_tree_item(item)
Пример #3
0
 def remote_stack_viewer(self):
     from idlelib import RemoteObjectBrowser
     oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {})
     if oid is None:
         self.tkconsole.root.bell()
         return
     item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
     from idlelib.TreeWidget import ScrolledCanvas, TreeNode
     top = Toplevel(self.tkconsole.root)
     theme = idleConf.GetOption('main','Theme','name')
     background = idleConf.GetHighlight(theme, 'normal')['background']
     sc = ScrolledCanvas(top, bg=background, highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     node = TreeNode(sc.canvas, None, item)
     node.expand()