Coverage for PyRx.shellCtrl : 52%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
#$Id: shellCtrl.py 91 2011-02-07 23:01:27Z sarkiss $ #self.shellMenu = viewMenu.AppendCheckItem(ID_SHELL, "Python Shell") #self.shellMenu.Check() #viewMenu.AppendSeparator()
#crust = py.crust.Crust(parent=self) # self.navigator = wx.aui.AuiNotebook(self,size=wx.Size(200,400)) # # self.filling = wx.py.crust.Filling(self.navigator,rootObject=self.myGLCanvas, # rootLabel="GL Canvas") # self.navigator.AddPage(self.filling, 'Namespace') # self.display = wx.py.crust.Display(parent=self.navigator) # self.navigator.AddPage(self.display, 'Display') # # Add 'pp' (pretty print) to the interpreter's locals. # # self.calltip = wx.py.crust.Calltip(parent=self.navigator) # self.navigator.AddPage(self.calltip, 'Calltip') # # self.sessionlisting = wx.py.crust.SessionListing(parent=self.navigator) # self.navigator.AddPage(self.sessionlisting, 'History') # # self.dispatcherlisting = wx.py.crust.DispatcherListing(parent=self.navigator) # self.navigator.AddPage(self.dispatcherlisting, 'Dispatcher') # # add the panes to the manager #self._mgr.AddPane(self.navigator, wx.LEFT, 'Control')
#uncomment the lines below to print stack each time a text is added in the shell #this is useful for debugging and removing print statement left by other users # self.fun = frame.shell.EnsureCaretVisible # frame.shell.EnsureCaretVisible = self.printStack
#self.ModifiyTraceback()
import traceback traceback.print_stack() self.fun()
from traceback import print_exception def print_exception_modified(etype, value, tb, limit=None, file=None): sys.last_type, sys.last_value, sys.last_traceback = sys.exc_info() #self.shell.redirectStderr(True) print_exception(etype, value, tb, limit, file) #self.shell.redirectStderr(False) self.shell.prompt() import traceback traceback.print_exception = print_exception_modified # import sys # sys.modules['traceback'].print_exception = print_exception_modified |