]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/ide/activegrid/tool/DebuggerService.py
removed patch 1373127
[wxWidgets.git] / wxPython / samples / ide / activegrid / tool / DebuggerService.py
index ae8f60cfe6e8e793fcb27cfc9e4ed7553744c5ac..547d8c9912d204ff61d9236757e5c63d433cc4c6 100644 (file)
@@ -41,6 +41,7 @@ import pickle
 import DebuggerHarness
 import traceback
 import StringIO
+import UICommon
 if wx.Platform == '__WXMSW__':
     try:
         import win32api
@@ -72,7 +73,12 @@ class OutputReaderThread(threading.Thread):
         self._lineCount = 0
         self._accumulate = accumulate
         self._callbackOnExit = callbackOnExit
-         
+        self.setDaemon(True)
+    
+    def __del__(self):
+        # See comment on DebugCommandUI.StopExecution
+        self._keepGoing = False
+             
     def run(self):
         file = self._file
         start = time.time()
@@ -83,7 +89,7 @@ class OutputReaderThread(threading.Thread):
                 text = file.readline()
                 if text == '' or text == None:
                     self._keepGoing = False
-                elif not self._accumulate:
+                elif not self._accumulate and self._keepGoing:
                     self._callback_function(text)
                 else:
                     # Should use a buffer? StringIO?
@@ -91,11 +97,11 @@ class OutputReaderThread(threading.Thread):
                 # Seems as though the read blocks if we got an error, so, to be
                 # sure that at least some of the exception gets printed, always 
                 # send the first hundred lines back as they come in.
-                if self._lineCount < 100:    
+                if self._lineCount < 100 and self._keepGoing:    
                     self._callback_function(output)
                     self._lineCount += 1
                     output = "" 
-                elif time.time() - start > 0.25:
+                elif time.time() - start > 0.25 and self._keepGoing:
                     try:
                         self._callback_function(output) 
                     except wx._core.PyDeadObjectError:
@@ -103,6 +109,8 @@ class OutputReaderThread(threading.Thread):
                         self._keepGoing = False
                     start = time.time()
                     output = "" 
+            #except TypeError:
+            #    pass
             except:
                 tp, val, tb = sys.exc_info()
                 print "Exception in OutputReaderThread.run():", tp, val
@@ -116,7 +124,7 @@ class OutputReaderThread(threading.Thread):
         
     def AskToStop(self):
         self._keepGoing = False
-        
+                
 import  wx.lib.newevent
 (UpdateTextEvent, EVT_UPDATE_STDTEXT) = wx.lib.newevent.NewEvent()
 (UpdateErrorEvent, EVT_UPDATE_ERRTEXT) = wx.lib.newevent.NewEvent()
@@ -124,8 +132,7 @@ import  wx.lib.newevent
 class Executor:
     
     def GetPythonExecutablePath():
-        config = wx.ConfigBase_Get()
-        path = config.Read("ActiveGridPythonLocation")
+        path = UICommon.GetPythonExecPath()
         if path:
             return path
         wx.MessageBox(_("To proceed I need to know the location of the python.exe you would like to use.\nTo set this, go to Tools-->Options and use the 'Python' tab to enter a value.\n"), _("Python Executable Location Unknown"))
@@ -141,24 +148,29 @@ class Executor:
         path = Executor.GetPythonExecutablePath()
         self._cmd = '"' + path + '" -u \"' + fileName + '\"'
         #Better way to do this? Quotes needed for windows file paths.
+        def spaceAndQuote(text):
+            if text.startswith("\"") and text.endswith("\""):
+                return  ' ' + text
+            else:
+                return ' \"' + text + '\"'
         if(arg1 != None):
-            self._cmd += ' \"' + arg1 + '\"'
+            self._cmd += spaceAndQuote(arg1)
         if(arg2 != None):
-            self._cmd += ' \"' + arg2 + '\"'
+            self._cmd += spaceAndQuote(arg2)
         if(arg3 != None):
-            self._cmd += ' \"' + arg3 + '\"'
+            self._cmd += spaceAndQuote(arg3)
         if(arg4 != None):
-            self._cmd += ' \"' + arg4 + '\"'
+            self._cmd += spaceAndQuote(arg4)
         if(arg5 != None):
-            self._cmd += ' \"' + arg5 + '\"'
+            self._cmd += spaceAndQuote(arg5)
         if(arg6 != None):
-            self._cmd += ' \"' + arg6 + '\"'
+            self._cmd += spaceAndQuote(arg6)
         if(arg7 != None):
-            self._cmd += ' \"' + arg7 + '\"'
+            self._cmd += spaceAndQuote(arg7)
         if(arg8 != None):
-            self._cmd += ' \"' + arg8 + '\"'
+            self._cmd += spaceAndQuote(arg8)
         if(arg9 != None):
-            self._cmd += ' \"' + arg9 + '\"'
+            self._cmd += spaceAndQuote(arg9)
         
         self._stdOutReader = None
         self._stdErrReader = None
@@ -177,8 +189,6 @@ class Executor:
             startIn = str(os.getcwd())
         startIn = os.path.abspath(startIn)
         command = self._cmd + ' ' + arguments
-        #stdinput = process.IOBuffer()
-        #self._process = process.ProcessProxy(command, mode='b', cwd=startIn, stdin=stdinput)
         self._process = process.ProcessOpen(command, mode='b', cwd=startIn, env=environment)
         # Kick off threads to read stdout and stderr and write them
         # to our text control. 
@@ -186,34 +196,46 @@ class Executor:
         self._stdOutReader.start()
         self._stdErrReader = OutputReaderThread(self._process.stderr, self._stdErrCallback, accumulate=False)
         self._stdErrReader.start()
-                
-    
+                        
     def DoStopExecution(self):
+        # See comment on DebugCommandUI.StopExecution
         if(self._process != None):
-            self._process.kill()
-            self._process.close()
-            self._process = None
-        if(self._stdOutReader != None):
             self._stdOutReader.AskToStop()
-        if(self._stdErrReader != None):
             self._stdErrReader.AskToStop()
+            try:
+                self._process.kill(gracePeriod=2.0)
+            except:
+                pass
+            self._process = None
         
 class RunCommandUI(wx.Panel):
+    runners = []
+    
+    def ShutdownAllRunners():
+        # See comment on DebugCommandUI.StopExecution
+        for runner in RunCommandUI.runners:
+            try:
+                runner.StopExecution(None)
+            except wx._core.PyDeadObjectError:
+                pass
+        RunCommandUI.runners = []    
+    ShutdownAllRunners = staticmethod(ShutdownAllRunners)
     
     def __init__(self, parent, id, fileName):
         wx.Panel.__init__(self, parent, id)
         self._noteBook = parent
         
+        threading._VERBOSE = _VERBOSE
+        
         self.KILL_PROCESS_ID = wx.NewId()
         self.CLOSE_TAB_ID = wx.NewId()
         
-        self.Bind(wx.EVT_END_PROCESS, self.OnProcessEnded)
         
         # GUI Initialization follows
         sizer = wx.BoxSizer(wx.HORIZONTAL)
         self._tb = tb = wx.ToolBar(self,  -1, wx.DefaultPosition, (30,1000), wx.TB_VERTICAL| wx.TB_FLAT, "Runner" )
         tb.SetToolBitmapSize((16,16))
-        sizer.Add(tb, 0, wx.EXPAND |wx.ALIGN_LEFT|wx.ALL, 1)
+        sizer.Add(tb, 0, wx.EXPAND|wx.ALIGN_LEFT|wx.ALL, 1)
 
         close_bmp = getCloseBitmap()
         tb.AddSimpleTool( self.CLOSE_TAB_ID, close_bmp, _('Close Window'))
@@ -241,12 +263,16 @@ class RunCommandUI(wx.Panel):
         self.SetSizer(sizer)
         sizer.Fit(self)
         
+        self._stopped = False
         # Executor initialization
         self._executor = Executor(fileName, self, callbackOnExit=self.ExecutorFinished)
         self.Bind(EVT_UPDATE_STDTEXT, self.AppendText)
         self.Bind(EVT_UPDATE_ERRTEXT, self.AppendErrorText)
         
+        RunCommandUI.runners.append(self)
+        
     def __del__(self):
+        # See comment on DebugCommandUI.StopExecution
         self._executor.DoStopExecution()
                  
     def Execute(self, initialArgs, startIn, environment):
@@ -263,9 +289,11 @@ class RunCommandUI(wx.Panel):
                 break
            
     def StopExecution(self):
-        self.Unbind(EVT_UPDATE_STDTEXT)
-        self.Unbind(EVT_UPDATE_ERRTEXT)
-        self._executor.DoStopExecution()
+        if not self._stopped:
+            self._stopped = True
+            self.Unbind(EVT_UPDATE_STDTEXT)
+            self.Unbind(EVT_UPDATE_ERRTEXT)
+            self._executor.DoStopExecution()
         
     def AppendText(self, event):
         self._textCtrl.SetReadOnly(False)
@@ -291,10 +319,10 @@ class RunCommandUI(wx.Panel):
         id = event.GetId()
         
         if id == self.KILL_PROCESS_ID:
-            self._executor.DoStopExecution()
+            self.StopExecution()
             
         elif id == self.CLOSE_TAB_ID:
-            self._executor.DoStopExecution()
+            self.StopExecution()
             index = self._noteBook.GetSelection()
             self._noteBook.GetPage(index).Show(False)
             self._noteBook.RemovePage(index)
@@ -345,8 +373,6 @@ class RunCommandUI(wx.Panel):
                 
         foundView.GetCtrl().MarkerAdd(lineNum -1, CodeEditor.CodeCtrl.CURRENT_LINE_MARKER_NUM)
 
-    def OnProcessEnded(self, evt):
-        self._executor.DoStopExecution()
 
 DEFAULT_PORT = 32032
 DEFAULT_HOST = 'localhost' 
@@ -370,11 +396,15 @@ class DebugCommandUI(wx.Panel):
     DebuggerRunning = staticmethod(DebuggerRunning)
     
     def ShutdownAllDebuggers():
+        # See comment on DebugCommandUI.StopExecution
         for debugger in DebugCommandUI.debuggers:
-            debugger.StopExecution()
-            
+            try:
+                debugger.StopExecution(None)
+            except wx._core.PyDeadObjectError:
+                pass
+        DebugCommandUI.debuggers = []    
     ShutdownAllDebuggers = staticmethod(ShutdownAllDebuggers)
-
+    
     def GetAvailablePort():
         for index in range( 0, len(DebugCommandUI.debuggerPortList)):               
             port = DebugCommandUI.debuggerPortList[index]
@@ -428,7 +458,6 @@ class DebugCommandUI(wx.Panel):
         
         self._parentNoteBook = parent
         self._command = command
-        self._textCtrl = None
         self._service = service
         self._executor = None
         self.STEP_ID = wx.NewId()
@@ -490,18 +519,10 @@ class DebugCommandUI(wx.Panel):
         tb.AddSimpleTool(self.CLEAR_ID, clear_bmp, _("Clear output pane"))
         wx.EVT_TOOL(self, self.CLEAR_ID, self.OnClearOutput)
         
-        tb.Realize()
         self.framesTab = None
         self.DisableWhileDebuggerRunning()
-        self._notebook = wx.Notebook(self, -1, wx.DefaultPosition, wx.DefaultSize, wx.LB_DEFAULT, "Debugger")
-        sizer.Add(self._notebook, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
-        self.consoleTab = self.MakeConsoleTab(self._notebook, wx.NewId(), None)
-        self.framesTab = self.MakeFramesTab(self._notebook, wx.NewId(), None)
-        self.breakPointsTab = self.MakeBreakPointsTab(self._notebook, wx.NewId(), None)
-        self._notebook.AddPage(self.consoleTab, "Output")
-        self._notebook.AddPage(self.framesTab, "Frames")
-        self._notebook.AddPage(self.breakPointsTab, "Break Points")
-        
+        self.framesTab = self.MakeFramesUI(self, wx.NewId(), None)
+        sizer.Add(self.framesTab, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
         self._statusBar = wx.StatusBar( self, -1)
         self._statusBar.SetFieldsCount(1)
         sizer.Add(self._statusBar, 0, wx.EXPAND |wx.ALIGN_LEFT|wx.ALL, 1)
@@ -509,6 +530,7 @@ class DebugCommandUI(wx.Panel):
         self.SetStatusText("Starting debug...")
         
         self.SetSizer(sizer)
+        tb.Realize()
         sizer.Fit(self)
         config = wx.ConfigBase_Get()
         self._debuggerHost = self._guiHost = config.Read("DebuggerHostName", DEFAULT_HOST)
@@ -550,14 +572,11 @@ class DebugCommandUI(wx.Panel):
     def BreakPointChange(self):
         if not self._stopped:
             self._callback.pushBreakpoints()
-        self.breakPointsTab.PopulateBPList()
+        self.framesTab.PopulateBPList()
         
     def __del__(self):
-        if self in DebugCommandUI.debuggers:
-            DebugCommandUI.debuggers.remove(self)
-        
-    def SwitchToOutputTab(self):
-        self._notebook.SetSelection(0)
+        # See comment on DebugCommandUI.StopExecution
+        self.StopExecution(None)        
         
     def DisableWhileDebuggerRunning(self):
         self._tb.EnableTool(self.STEP_ID, False)
@@ -573,7 +592,6 @@ class DebugCommandUI(wx.Panel):
                 openDoc.GetFirstView().GetCtrl().ClearCurrentLineMarkers() 
         if self.framesTab:   
             self.framesTab.ClearWhileRunning()
-        #wx.GetApp().ProcessPendingEvents() #Yield(True)
         
     def EnableWhileDebuggerStopped(self):
         self._tb.EnableTool(self.STEP_ID, True)
@@ -583,8 +601,6 @@ class DebugCommandUI(wx.Panel):
         if _WATCHES_ON:
             self._tb.EnableTool(self.ADD_WATCH_ID, True)
         self._tb.EnableTool(self.BREAK_INTO_DEBUGGER_ID, False)
-        #if _WINDOWS:
-        #    wx.GetApp().GetTopWindow().RequestUserAttention()
  
     def ExecutorFinished(self):          
         if _VERBOSE: print "In ExectorFinished"
@@ -609,7 +625,7 @@ class DebugCommandUI(wx.Panel):
         self._tb.EnableTool(self.BREAK_INTO_DEBUGGER_ID, False)
         self._tb.EnableTool(self.KILL_PROCESS_ID, False)
 
-    def SynchCurrentLine(self, filename, lineNum):
+    def SynchCurrentLine(self, filename, lineNum, noArrow=False):
         # FACTOR THIS INTO DocManager
         self.DeleteCurrentLineMarkers()
         
@@ -639,8 +655,9 @@ class DebugCommandUI(wx.Panel):
             foundView.Activate()
             foundView.GotoLine(lineNum)
             startPos = foundView.PositionFromLine(lineNum)
-                
-        foundView.GetCtrl().MarkerAdd(lineNum -1, CodeEditor.CodeCtrl.CURRENT_LINE_MARKER_NUM)
+            
+        if not noArrow:        
+            foundView.GetCtrl().MarkerAdd(lineNum -1, CodeEditor.CodeCtrl.CURRENT_LINE_MARKER_NUM)
 
     def DeleteCurrentLineMarkers(self):
         openDocs = wx.GetApp().GetDocumentManager().GetDocuments()
@@ -664,85 +681,69 @@ class DebugCommandUI(wx.Panel):
         
                        
     def StopExecution(self, event):
-        self._stopped = True
-        self.DisableAfterStop()
-        try:
-            self._callback.ServerClose()
-        except:
-            pass 
-        try:
-            if self._executor:
-                self._executor.DoStopExecution()
-                self._executor = None
-        except:
-            pass
-        self.DeleteCurrentLineMarkers()
-        DebugCommandUI.ReturnPortToPool(self._debuggerPort)
-        DebugCommandUI.ReturnPortToPool(self._guiPort)
-        DebugCommandUI.ReturnPortToPool(self._debuggerBreakPort)
+        # This is a general comment on shutdown for the running and debugged processes. Basically, the
+        # current state of this is the result of trial and error coding. The common problems were memory
+        # access violations and threads that would not exit. Making the OutputReaderThreads daemons seems
+        # to have side-stepped the hung thread issue. Being very careful not to touch things after calling
+        # process.py:ProcessOpen.kill() also seems to have fixed the memory access violations, but if there
+        # were more ugliness discovered I would not be surprised. If anyone has any help/advice, please send
+        # it on to mfryer@activegrid.com.
+        if not self._stopped:
+            self._stopped = True
+            try:
+                self.DisableAfterStop()
+            except wx._core.PyDeadObjectError:
+                pass
+            try:
+                self._callback.ShutdownServer()
+            except:
+                tp,val,tb = sys.exc_info()
+                traceback.print_exception(tp, val, tb)
 
+            try:
+                self.DeleteCurrentLineMarkers()
+            except:
+                pass
+            try:
+                DebugCommandUI.ReturnPortToPool(self._debuggerPort)
+                DebugCommandUI.ReturnPortToPool(self._guiPort)
+                DebugCommandUI.ReturnPortToPool(self._debuggerBreakPort)
+            except:
+                pass
+            try:
+                if self._executor:
+                    self._executor.DoStopExecution()
+                    self._executor = None
+            except:
+                tp,val,tb = sys.exc_info()
+                traceback.print_exception(tp, val, tb)                
     def StopAndRemoveUI(self, event):
         self.StopExecution(None)
         if self in DebugCommandUI.debuggers:
             DebugCommandUI.debuggers.remove(self)
         index = self._parentNoteBook.GetSelection()
         self._parentNoteBook.GetPage(index).Show(False)
-        self._parentNoteBook.RemovePage(index)
-
-    def GetConsoleTextControl(self):
-        return self._textCtrl
-        
-    def OnClearOutput(self, event):
-        self._textCtrl.SetReadOnly(False)
-        self._textCtrl.ClearAll()  
-        self._textCtrl.SetReadOnly(True)
+        self._parentNoteBook.RemovePage(index)       
 
     def OnAddWatch(self, event):
         if self.framesTab:
             self.framesTab.OnWatch(event)
-                  
-    def MakeConsoleTab(self, parent, id, debugger):
-        panel = wx.Panel(parent, id)
-        sizer = wx.BoxSizer(wx.HORIZONTAL)
-        self._textCtrl = STCTextEditor.TextCtrl(panel, wx.NewId())
-        sizer.Add(self._textCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
-        self._textCtrl.SetViewLineNumbers(False)
-        self._textCtrl.SetReadOnly(True)
-        if wx.Platform == '__WXMSW__':
-            font = "Courier New"
-        else:
-            font = "Courier"
-        self._textCtrl.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName = font))
-        self._textCtrl.SetFontColor(wx.BLACK)
-        self._textCtrl.StyleClearAll()
-        panel.SetSizer(sizer)
-        sizer.Fit(panel)
-
-        return panel
-        
-    def MakeFramesTab(self, parent, id, debugger):
+                        
+    def MakeFramesUI(self, parent, id, debugger):
         panel = FramesUI(parent, id, self)
         return panel
         
-    def MakeBreakPointsTab(self, parent, id, debugger):
-        panel = BreakpointsUI(parent, id, self)
-        return panel
-        
     def AppendText(self, event):
-        self._textCtrl.SetReadOnly(False)
-        self._textCtrl.AddText(event.value)
-        self._textCtrl.ScrollToLine(self._textCtrl.GetLineCount())
-        self._textCtrl.SetReadOnly(True)
+        self.framesTab.AppendText(event.value)
         
     def AppendErrorText(self, event):
-        self._textCtrl.SetReadOnly(False)
-        self._textCtrl.SetFontColor(wx.RED)   
-        self._textCtrl.StyleClearAll()
-        self._textCtrl.AddText(event.value)
-        self._textCtrl.ScrollToLine(self._textCtrl.GetLineCount())
-        self._textCtrl.SetFontColor(wx.BLACK)   
-        self._textCtrl.StyleClearAll()
-        self._textCtrl.SetReadOnly(True)
+        self.framesTab.AppendErrorText(event.value)
+        
+    def OnClearOutput(self, event):
+        self.framesTab.ClearOutput(None)
+
+    def SwitchToOutputTab(self):
+        self.framesTab.SwitchToOutputTab()
         
 class BreakpointsUI(wx.Panel):
     def __init__(self, parent, id, ui):
@@ -753,7 +754,6 @@ class BreakpointsUI(wx.Panel):
         self.Bind(wx.EVT_MENU, self.ClearBreakPoint, id=self.clearBPID)
         self.syncLineID = wx.NewId()
         self.Bind(wx.EVT_MENU, self.SyncBPLine, id=self.syncLineID)
-
         sizer = wx.BoxSizer(wx.VERTICAL)
         p1 = self
         self._bpListCtrl = wx.ListCtrl(p1, -1, pos=wx.DefaultPosition, size=(1000,1000), style=wx.LC_REPORT)
@@ -767,6 +767,11 @@ class BreakpointsUI(wx.Panel):
         self._bpListCtrl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnListRightClick)
         self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.ListItemSelected, self._bpListCtrl)
         self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.ListItemDeselected, self._bpListCtrl)
+        
+        def OnLeftDoubleClick(event):
+            self.SyncBPLine(event)
+            
+        wx.EVT_LEFT_DCLICK(self._bpListCtrl, OnLeftDoubleClick)
 
         self.PopulateBPList()
 
@@ -803,7 +808,7 @@ class BreakpointsUI(wx.Panel):
             list = self._bpListCtrl
             fileName = list.GetItem(self.currentItem, 2).GetText()
             lineNumber = list.GetItem(self.currentItem, 1).GetText()
-            self._ui.SynchCurrentLine( fileName, int(lineNumber) )  
+            self._ui.SynchCurrentLine( fileName, int(lineNumber) , noArrow=True)  
 
     def ClearBreakPoint(self, event):
         if self.currentItem >= 0:
@@ -903,25 +908,24 @@ class FramesUI(wx.SplitterWindow):
     def __init__(self, parent, id, ui):
         wx.SplitterWindow.__init__(self, parent, id, style = wx.SP_3D)
         self._ui = ui
-        sizer = wx.BoxSizer(wx.VERTICAL)
         self._p1 = p1 = wx.ScrolledWindow(self, -1)
-        p1.Bind(wx.EVT_SIZE, self.OnSize)
 
-        self._framesListCtrl = wx.ListCtrl(p1, -1, pos=wx.DefaultPosition, size=(250,150), style=wx.LC_REPORT)
-        sizer.Add(self._framesListCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
-        self._framesListCtrl.InsertColumn(0, "Frame")   
-        self._framesListCtrl.SetColumnWidth(0, 250)
-        self._framesListCtrl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnListRightClick)
-        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.ListItemSelected, self._framesListCtrl)
-        self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.ListItemDeselected, self._framesListCtrl)
+        sizer = wx.BoxSizer(wx.HORIZONTAL)
+        framesLabel = wx.StaticText(self, -1, "Stack Frame:")
+        sizer.Add(framesLabel, 0, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.LEFT, border=2)
+                               
+        self._framesChoiceCtrl = wx.Choice(p1, -1, choices=["                                           "])
+        sizer.Add(self._framesChoiceCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
+        self._framesChoiceCtrl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnListRightClick)
+        self.Bind(wx.EVT_CHOICE, self.ListItemSelected, self._framesChoiceCtrl)
 
         sizer2 = wx.BoxSizer(wx.VERTICAL)
-        self._p2 = p2 = wx.ScrolledWindow(self, -1)
-        p2.Bind(wx.EVT_SIZE, self.OnSize)
-
-        self._treeCtrl = wx.gizmos.TreeListCtrl(p2, -1, size=(530,250), style=wx.TR_DEFAULT_STYLE| wx.TR_FULL_ROW_HIGHLIGHT)
+        p1.SetSizer(sizer2)
+        
+        self._treeCtrl = wx.gizmos.TreeListCtrl(p1, -1, style=wx.TR_DEFAULT_STYLE| wx.TR_FULL_ROW_HIGHLIGHT)
         self._treeCtrl.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK, self.OnRightClick)
-        sizer2.Add(self._framesListCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
+        sizer2.Add(sizer, 0, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
+        sizer2.Add(self._treeCtrl,1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
         tree = self._treeCtrl                           
         tree.AddColumn("Thing")
         tree.AddColumn("Value")
@@ -930,11 +934,131 @@ class FramesUI(wx.SplitterWindow):
         tree.SetColumnWidth(1, 355)
         self._root = tree.AddRoot("Frame")
         tree.SetItemText(self._root, "", 1)
+        tree.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.IntrospectCallback)
+
+        self._p2 = p2 = wx.Window(self, -1)
+        sizer3 = wx.BoxSizer(wx.HORIZONTAL)
+        p2.SetSizer(sizer3)
+        p2.Bind(wx.EVT_SIZE, self.OnSize)
+        self._notebook = wx.Notebook(p2, -1, size=(20,20))
+        self._notebook.Hide()
+        sizer3.Add(self._notebook, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 1)
+        self.consoleTab = self.MakeConsoleTab(self._notebook, wx.NewId())
+        self.inspectConsoleTab = self.MakeInspectConsoleTab(self._notebook, wx.NewId())
+        self.breakPointsTab = self.MakeBreakPointsTab(self._notebook, wx.NewId())
+        self._notebook.AddPage(self.consoleTab, "Output")
+        self._notebook.AddPage(self.inspectConsoleTab, "Interact")
+        self._notebook.AddPage(self.breakPointsTab, "Break Points")
 
         self.SetMinimumPaneSize(20)
-        self.SplitVertically(p1, p2, 250)
+        self.SplitVertically(p1, p2, 550)
         self.currentItem = None
-        self.Layout()
+        self._notebook.Show(True)
+   
+    def PopulateBPList(self):
+        self.breakPointsTab.PopulateBPList()
+        
+    def OnSize(self, event):
+        self._notebook.SetSize(self._p2.GetSize())
+             
+    def MakeConsoleTab(self, parent, id):
+        panel = wx.Panel(parent, id)
+        sizer = wx.BoxSizer(wx.HORIZONTAL)
+        self._textCtrl = STCTextEditor.TextCtrl(panel, wx.NewId())
+        sizer.Add(self._textCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 2)
+        self._textCtrl.SetViewLineNumbers(False)
+        self._textCtrl.SetReadOnly(True)
+        if wx.Platform == '__WXMSW__':
+            font = "Courier New"
+        else:
+            font = "Courier"
+        self._textCtrl.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName = font))
+        self._textCtrl.SetFontColor(wx.BLACK)
+        self._textCtrl.StyleClearAll()
+        panel.SetSizer(sizer)
+        #sizer.Fit(panel)
+
+        return panel
+        
+    def MakeInspectConsoleTab(self, parent, id):
+        self.command_list = []
+        self.command_index = 0
+        def ExecuteCommand(command):
+            if not len(self.command_list) or not command == self.command_list[len(self.command_list) -1]:
+                self.command_list.append(command)
+                self.command_index = len(self.command_list) - 1
+            retval = self._ui._callback._debuggerServer.execute_in_frame(self._framesChoiceCtrl.GetStringSelection(), command)
+            self._interCtrl.AddText("\n" + str(retval))
+            self._interCtrl.ScrollToLine(self._interCtrl.GetLineCount())
+            # Refresh the tree view in case this command resulted in changes there. TODO: Need to reopen tree items.
+            self.PopulateTreeFromFrameMessage(self._framesChoiceCtrl.GetStringSelection())
+
+        def ReplaceLastLine(command):
+            line = self._interCtrl.GetLineCount() - 1
+            self._interCtrl.GotoLine(line)
+            start = self._interCtrl.GetCurrentPos()
+            self._interCtrl.SetTargetStart(start)
+            end = self._interCtrl.GetLineEndPosition(line)
+            self._interCtrl.SetTargetEnd(end)
+            self._interCtrl.ReplaceTarget(">>> " + command)
+            self._interCtrl.GotoLine(line)
+            self._interCtrl.SetSelectionStart(self._interCtrl.GetLineEndPosition(line))
+            
+        def OnKeyPressed(event):
+            key = event.KeyCode()
+            if key == wx.WXK_DELETE or key == wx.WXK_BACK:
+                if self._interCtrl.GetLine(self._interCtrl.GetCurrentLine()) == ">>> ":
+                    return
+            elif key == wx.WXK_RETURN:
+                command = self._interCtrl.GetLine(self._interCtrl.GetCurrentLine())[4:]
+                ExecuteCommand(command)             
+                self._interCtrl.AddText("\n>>> ")
+                return
+            elif key == wx.WXK_UP:
+                if not len(self.command_list):
+                    return
+                ReplaceLastLine(self.command_list[self.command_index])
+                if self.command_index  == 0:
+                    self.command_index  = len(self.command_list) - 1
+                else:
+                    self.command_index = self.command_index - 1
+                return
+            elif key == wx.WXK_DOWN:
+                if not len(self.command_list):
+                    return
+                if self.command_index  < len(self.command_list) - 1:
+                    self.command_index = self.command_index + 1
+                else:
+                    self.command_index = 0
+                ReplaceLastLine(self.command_list[self.command_index])                        
+                return
+            event.Skip()
+
+        try:    
+            panel = wx.Panel(parent, id)
+            sizer = wx.BoxSizer(wx.HORIZONTAL)
+            self._interCtrl = STCTextEditor.TextCtrl(panel, wx.NewId())
+            sizer.Add(self._interCtrl, 1, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 2)
+            self._interCtrl.SetViewLineNumbers(False)
+            if wx.Platform == '__WXMSW__':
+                font = "Courier New"
+            else:
+                font = "Courier"
+            self._interCtrl.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName = font))
+            self._interCtrl.SetFontColor(wx.BLACK)
+            self._interCtrl.StyleClearAll()
+            wx.EVT_KEY_DOWN(self._interCtrl, OnKeyPressed)
+            self._interCtrl.AddText(">>> ")
+            panel.SetSizer(sizer)
+        except:
+            tp, val, tb = sys.exc_info()
+            traceback.print_exception(tp, val, tb)   
+            
+        return panel 
+               
+    def MakeBreakPointsTab(self, parent, id):
+        panel = BreakpointsUI(parent, id, self._ui)
+        return panel
      
     def OnRightClick(self, event):
         #Refactor this...
@@ -944,13 +1068,6 @@ class FramesUI(wx.SplitterWindow):
         if not _WATCHES_ON and watchOnly:
             return
         menu = wx.Menu()
-        if not watchOnly:
-            if not hasattr(self, "introspectID"):
-                self.introspectID = wx.NewId()
-                self.Bind(wx.EVT_MENU, self.OnIntrospect, id=self.introspectID)
-            item = wx.MenuItem(menu, self.introspectID, "Attempt Introspection")
-            menu.AppendItem(item)
-            menu.AppendSeparator()
         if _WATCHES_ON:
             if not hasattr(self, "watchID"):
                 self.watchID = wx.NewId()
@@ -1016,13 +1133,13 @@ class FramesUI(wx.SplitterWindow):
         wx.GetApp().GetTopWindow().SetCursor(wx.StockCursor(wx.CURSOR_WAIT))
 
         try:
-            list = self._framesListCtrl
+            list = self._framesChoiceCtrl
             frameNode = self._stack[int(self.currentItem)]
             message = frameNode.getAttribute("message") 
             binType = self._ui._callback._debuggerServer.attempt_introspection(message, self._parentChain)
             xmldoc = bz2.decompress(binType.data)
-               
             domDoc = parseString(xmldoc)
+            #wx.MessageBox(xmldoc, "result of introspection")
             nodeList = domDoc.getElementsByTagName('replacement')
             replacementNode = nodeList.item(0)
             if len(replacementNode.childNodes):
@@ -1030,6 +1147,7 @@ class FramesUI(wx.SplitterWindow):
                 tree = self._treeCtrl
                 parent = tree.GetItemParent(self._introspectItem)
                 treeNode = self.AppendSubTreeFromNode(thingToWalk, thingToWalk.getAttribute('name'), parent, insertBefore=self._introspectItem)
+                self._treeCtrl.Expand(treeNode)
                 tree.Delete(self._introspectItem)
         except:
             tp,val,tb = sys.exc_info()
@@ -1037,16 +1155,16 @@ class FramesUI(wx.SplitterWindow):
             
         wx.GetApp().GetTopWindow().SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
         
-    def OnSize(self, event):
-        self._treeCtrl.SetSize(self._p2.GetSize())
-        w,h = self._p1.GetClientSizeTuple()
-        self._framesListCtrl.SetDimensions(0, 0, w, h)
-
     def ClearWhileRunning(self):
-        list = self._framesListCtrl
-        list.DeleteAllItems()
-        tree = self._treeCtrl     
-        tree.Hide()
+        list = self._framesChoiceCtrl
+        list.Clear()
+        list.Enable(False)
+        tree = self._treeCtrl  
+        root = self._root   
+        tree.DeleteChildren(root)
+        self._interCtrl.Enable(False)
+   
+        #tree.Hide()
         
     def OnListRightClick(self, event):
         if not hasattr(self, "syncFrameID"):
@@ -1059,7 +1177,7 @@ class FramesUI(wx.SplitterWindow):
         menu.Destroy()
 
     def OnSyncFrame(self, event):
-        list = self._framesListCtrl
+        list = self._framesChoiceCtrl
         frameNode = self._stack[int(self.currentItem)]
         file = frameNode.getAttribute("file")
         line = frameNode.getAttribute("line")
@@ -1067,20 +1185,29 @@ class FramesUI(wx.SplitterWindow):
         
     def LoadFramesListXML(self, framesXML):
         wx.GetApp().GetTopWindow().SetCursor(wx.StockCursor(wx.CURSOR_WAIT))
+        self._interCtrl.Enable(True)
+
         try:
             domDoc = parseString(framesXML)
-            list = self._framesListCtrl
-            list.DeleteAllItems()
+            list = self._framesChoiceCtrl
+            list.Clear()
             self._stack = []
             nodeList = domDoc.getElementsByTagName('frame')
             frame_count = -1
             for index in range(0, nodeList.length):
                 frameNode = nodeList.item(index)
                 message = frameNode.getAttribute("message")
-                list.InsertStringItem(index, message)
+                list.Append(message)
                 self._stack.append(frameNode)
                 frame_count += 1
-            list.Select(frame_count) 
+            index = len(self._stack) - 1
+            list.SetSelection(index) 
+
+            node = self._stack[index]
+            self.currentItem = index
+            self.PopulateTreeFromFrameNode(node)
+            self.OnSyncFrame(None)
+
             self._p1.FitInside()    
             frameNode = nodeList.item(index)
             file = frameNode.getAttribute("file")
@@ -1092,19 +1219,30 @@ class FramesUI(wx.SplitterWindow):
               
         wx.GetApp().GetTopWindow().SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
 
-    def ListItemDeselected(self, event):
-        pass
         
     def ListItemSelected(self, event):
-        self.currentItem = event.m_itemIndex
-        frameNode = self._stack[int(self.currentItem)]
-        self.PopulateTreeFromFrameNode(frameNode)
-        # Temporarily doing this to test out automatically swicting to source line.
+        self.PopulateTreeFromFrameMessage(event.GetString())
         self.OnSyncFrame(None)
         
+    def PopulateTreeFromFrameMessage(self, message):    
+        index = 0
+        for node in self._stack:
+            if node.getAttribute("message") == message:
+                binType = self._ui._callback._debuggerServer.request_frame_document(message)
+                xmldoc = bz2.decompress(binType.data)
+                domDoc = parseString(xmldoc)
+                nodeList = domDoc.getElementsByTagName('frame')
+                self.currentItem = index
+                if len(nodeList):
+                    self.PopulateTreeFromFrameNode(nodeList[0])
+                return
+            index = index + 1
+                        
     def PopulateTreeFromFrameNode(self, frameNode):
+        list = self._framesChoiceCtrl
+        list.Enable(True)
         tree = self._treeCtrl 
-        tree.Show(True)
+        #tree.Show(True)
         root = self._root   
         tree.DeleteChildren(root)
         children = frameNode.childNodes
@@ -1115,8 +1253,22 @@ class FramesUI(wx.SplitterWindow):
             if not firstChild:
                 firstChild = treeNode
         tree.Expand(root)
-        tree.Expand(firstChild)
+        if firstChild:
+            tree.Expand(firstChild)
         self._p2.FitInside()
+        
+    def IntrospectCallback(self, event):
+        tree = self._treeCtrl 
+        item = event.GetItem()
+        if _VERBOSE:
+            print "In introspectCallback item is %s, pydata is %s" % (event.GetItem(), tree.GetPyData(item))
+        if tree.GetPyData(item) != "Introspect":
+            event.Skip()
+            return
+        self._introspectItem = item
+        self._parentChain = self.GetItemChain(item)
+        self.OnIntrospect(event)
+        event.Skip()
             
     def AppendSubTreeFromNode(self, node, name, parent, insertBefore=None):
         tree = self._treeCtrl 
@@ -1125,7 +1277,12 @@ class FramesUI(wx.SplitterWindow):
         else: 
             treeNode = tree.AppendItem(parent, name)
         children = node.childNodes
-        if children.length == 0:
+        intro = node.getAttribute('intro')
+            
+        if intro == "True":
+            tree.SetItemHasChildren(treeNode, True)
+            tree.SetPyData(treeNode, "Introspect")
+        if node.getAttribute("value"):
             tree.SetItemText(treeNode, self.StripOuterSingleQuotes(node.getAttribute("value")), 1)
         for index in range(0, children.length):
             subNode = children.item(index)
@@ -1136,15 +1293,23 @@ class FramesUI(wx.SplitterWindow):
                 value = self.StripOuterSingleQuotes(subNode.getAttribute("value"))
                 n = tree.AppendItem(treeNode, name)
                 tree.SetItemText(n, value, 1)
+                intro = subNode.getAttribute('intro')
+                if intro == "True":
+                    tree.SetItemHasChildren(n, True)
+                    tree.SetPyData(n, "Introspect")
+
         return treeNode
         
     def StripOuterSingleQuotes(self, string):
         if string.startswith("'") and string.endswith("'"):
-            return string[1:-1]
-        elif type(string) == types.UnicodeType:
-            return string[1:-1]
+            retval =  string[1:-1]
+        elif string.startswith("\"") and string.endswith("\""):
+            retval = string[1:-1]
         else:
-            return string
+            retval = string
+        if retval.startswith("u'") and retval.endswith("'"):
+            retval = retval[1:]
+        return retval
             
     def HasChildren(self, node):
         try:
@@ -1152,7 +1317,31 @@ class FramesUI(wx.SplitterWindow):
         except:
             tp,val,tb=sys.exc_info()
             return False
-                    
+    def AppendText(self, text):
+        self._textCtrl.SetReadOnly(False)
+        self._textCtrl.AddText(text)
+        self._textCtrl.ScrollToLine(self._textCtrl.GetLineCount())
+        self._textCtrl.SetReadOnly(True)
+        
+    def AppendErrorText(self, text):
+        self._textCtrl.SetReadOnly(False)
+        self._textCtrl.SetFontColor(wx.RED)   
+        self._textCtrl.StyleClearAll()
+        self._textCtrl.AddText(text)
+        self._textCtrl.ScrollToLine(self._textCtrl.GetLineCount())
+        self._textCtrl.SetFontColor(wx.BLACK)   
+        self._textCtrl.StyleClearAll()
+        self._textCtrl.SetReadOnly(True)
+        
+    def ClearOutput(self, event):
+        self._textCtrl.SetReadOnly(False)
+        self._textCtrl.ClearAll()  
+        self._textCtrl.SetReadOnly(True)
+
+    def SwitchToOutputTab(self):
+        self._notebook.SetSelection(0) 
+                          
 class DebuggerView(Service.ServiceView):
     
     #----------------------------------------------------------------------------
@@ -1171,7 +1360,13 @@ class DebuggerView(Service.ServiceView):
     
     def OnToolClicked(self, event):
         self.GetFrame().ProcessEvent(event)
-    
+        
+    def ProcessUpdateUIEvent(self, event):
+        return False
+        
+    def ProcessEvent(self, event):
+        return False
+
     #------------------------------------------------------------------------------
     # Class methods
     #-----------------------------------------------------------------------------
@@ -1315,9 +1510,9 @@ class DebuggerCallback:
     def start(self):
         self._serverHandlerThread.start()
     
-    def ServerClose(self):
-        rbt = RequestBreakThread(self._breakServer, kill=True)
-        rbt.start()
+    def ShutdownServer(self):
+        #rbt = RequestBreakThread(self._breakServer, kill=True)
+        #rbt.start()
         self.setWaiting(False)
         if self._serverHandlerThread:
             self._serverHandlerThread.AskToStop()
@@ -1329,29 +1524,21 @@ class DebuggerCallback:
                 
     def SingleStep(self):
         self._debuggerUI.DisableWhileDebuggerRunning()
-        #dot = DebuggerOperationThread(self._debuggerServer.set_step)
-        #dot.start()
         self._debuggerServer.set_step() # Figure out where to set allowNone
         self.waitForRPC()
 
     def Next(self):
         self._debuggerUI.DisableWhileDebuggerRunning()
-        #dot = DebuggerOperationThread(self._debuggerServer.set_next)
-        #dot.start()
         self._debuggerServer.set_next()
         self.waitForRPC()
         
     def Continue(self):
         self._debuggerUI.DisableWhileDebuggerRunning()
-        #dot = DebuggerOperationThread(self._debuggerServer.set_continue)
-        #dot.start()
         self._debuggerServer.set_continue()
         self.waitForRPC()
         
     def Return(self):
         self._debuggerUI.DisableWhileDebuggerRunning()
-        #dot = DebuggerOperationThread(self._debuggerServer.set_return)
-        #dot.start()
         self._debuggerServer.set_return()
         self.waitForRPC()
         
@@ -1427,6 +1614,7 @@ class DebuggerService(Service.Service):
     DEBUG_ID = wx.NewId()
     DEBUG_WEBSERVER_ID = wx.NewId()
 
+            
     def ComparePaths(first, second):
         one = DebuggerService.ExpandPath(first)
         two = DebuggerService.ExpandPath(second)
@@ -1442,7 +1630,8 @@ class DebuggerService(Service.Service):
             try:
                 return win32api.GetLongPathName(path)
             except:
-                print "Cannot get long path for %s" % path
+                if _VERBOSE:
+                    print "Cannot get long path for %s" % path
                 
         return path
         
@@ -1614,11 +1803,19 @@ class DebuggerService(Service.Service):
             pass
             
     def OnDebugWebServer(self, event):
+        if _WINDOWS and not _PYWIN32_INSTALLED:
+            wx.MessageBox(_("Python for Windows extensions (pywin32) is required to debug on Windows machines. Please go to http://sourceforge.net/projects/pywin32/, download and install pywin32."))
+            return
+        if not Executor.GetPythonExecutablePath():
+            return
+        if DebugCommandUI.DebuggerRunning():
+            wx.MessageBox(_("A debugger is already running. Please shut down the other debugger first."), _("Debugger Running"))
+            return
         import WebServerService
         wsService = wx.GetApp().GetService(WebServerService.WebServerService)
         fileName, args = wsService.StopAndPrepareToDebug()
         try:
-            page = DebugCommandUI(Service.ServiceView.bottomTab, -1, str(fileName), self)
+            page = DebugCommandUI(Service.ServiceView.bottomTab, -1, fileName, self)
             count = Service.ServiceView.bottomTab.GetPageCount()
             Service.ServiceView.bottomTab.AddPage(page, _("Debugging: Internal WebServer"))
             Service.ServiceView.bottomTab.SetSelection(count)
@@ -1659,6 +1856,7 @@ class DebuggerService(Service.Service):
 
     def OnExit(self):
         DebugCommandUI.ShutdownAllDebuggers()
+        RunCommandUI.ShutdownAllRunners()
         
     def OnRunProject(self, event):
         if _WINDOWS and not _PYWIN32_INSTALLED:
@@ -1914,9 +2112,6 @@ class CommandPropertiesDialog(wx.Dialog):
             self._lastStartIn = str(os.getcwd())
         self._startEntry = wx.TextCtrl(self, -1, self._lastStartIn)
         self._startEntry.SetToolTipString(self._lastStartIn)
-        def TextChanged2(event):
-            self._startEntry.SetToolTipString(event.GetString())
-        self.Bind(wx.EVT_TEXT, TextChanged2, self._startEntry)
 
         flexGridSizer.Add(self._startEntry, 1, wx.EXPAND)
         self._findDir = wx.Button(self, -1, _("Browse..."))
@@ -1934,7 +2129,7 @@ class CommandPropertiesDialog(wx.Dialog):
         flexGridSizer.Add(self._pythonPathEntry, 1, wx.EXPAND)
         flexGridSizer.Add(wx.StaticText(parent, -1, ""), 0)
         flexGridSizer.Add(wx.StaticText(parent, -1, ""), 0)
-        if debugging:
+        if debugging and _WINDOWS:
             self._postpendCheckBox = wx.CheckBox(self, -1, postpendStaticText)
             checked = bool(config.ReadInt("PythonPathPostpend", 1))
             self._postpendCheckBox.SetValue(checked)
@@ -2144,19 +2339,20 @@ def getBreakIcon():
     return wx.IconFromBitmap(getBreakBitmap())
 
 #----------------------------------------------------------------------
+
 def getClearOutputData():
     return \
 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
 \x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
-\x00\x00\xb4IDAT8\x8d\xa5\x92\xdd\r\x03!\x0c\x83\xbf\xa0n\xd4\x9d\xda5\xb81\
-\xbaS\xbb\x12\xee\x03?\xe5\x08\xe5N\xba\xbc Db\xec\xd8p\xb1l\xb8\xa7\x83\xfe\
-\xb0\x02H\x92F\xc0_\xa3\x99$\x99\x99\xedznc\xe36\x81\x88\x98"\xb2\x02\xa2\
-\x1e\xc4Q\x9aUD\x161\xcd\xde\x1c\x83\x15\x084)\x8d\xc5)\x06\xab\xaaZ\x92\xee\
-\xce\x11W\xdbGD\x0cIT\x06\xe7\x00\xdeY\xfe\xcc\x89\x06\xf0\xf2\x99\x00\xe0\
-\x91\x7f\xab\x83\xed\xa4\xc8\xafK\x0c\xcf\x92\x83\x99\x8d\xe3p\xef\xe4\xa1\
-\x0b\xe57j\xc8:\x06\t\x08\x87.H\xb2n\xa8\xc9\xa9\x12vQ\xfeG"\xe3\xacw\x00\
-\x10$M\xd3\x86_\xf0\xe5\xfc\xb4\xfa\x02\xcb\x13j\x10\xc5\xd7\x92D\x00\x00\
-\x00\x00IEND\xaeB`\x82' 
+\x00\x00\xb7IDAT8\x8d\xa5\x93\xdd\x11\xc3 \x0c\x83%`\xa3\xee\xd4\xaeA\xc6\
+\xe8N\xedF%\xea\x03\t\x81\xf0\x97\xbb\xf8%G\xce\xfe\x90eC\x1a\x8b;\xe1\xf2\
+\x83\xd6\xa0Q2\x8de\xf5oW\xa05H\xea\xd7\x93\x84$\x18\xeb\n\x88;\'.\xd5\x1d\
+\x80\x07\xe1\xa1\x1d\xa2\x1cbF\x92\x0f\x80\xe0\xd1 \xb7\x14\x8c \x00*\x15\
+\x97\x14\x8c\x8246\x1a\xf8\x98\'/\xdf\xd8Jn\xe65\xc0\xa7\x90_L"\x01\xde\x9d\
+\xda\xa7\x92\xfb\xc5w\xdf\t\x07\xc4\x05ym{\xd0\x1a\xe3\xb9xS\x81\x04\x18\x05\
+\xc9\x04\xc9a\x00Dc9\x9d\x82\xa4\xbc\xe8P\xb2\xb5P\xac\xf2\x0c\xd4\xf5\x00\
+\x88>\xac\xe17\x84\xe4\xb9G\x8b7\x9f\xf3\x1fsUl^\x7f\xe7y\x0f\x00\x00\x00\
+\x00IEND\xaeB`\x82' 
 
 def getClearOutputBitmap():
     return BitmapFromImage(getClearOutputImage())
@@ -2199,13 +2395,15 @@ def getContinueData():
     return \
 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
 \x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
-\x00\x00\x9eIDAT8\x8d\xbd\x92\xd1\r\x83@\x0cC\xed\x8a\x11X\xac\x1b\xddF,\xd6\
-\x11\x90\xdc\x0f\x9a\x93s)\x14Z\xa9\x91\x10\n\x97\xbc\xd89\x80?\x84\x1a\xa4\
-\x83\xfc\x1c$\x1e)7\xdf<Y0\xaf\x0b\xe6\xf5\x1d\xa1\xb5\x13C\x03 !\xaa\xfd\
-\xed\n:mr\xc0\x1d\x8f\xc9\x9a!\t$\xe5\xd3I\xe2\xe5B$\x99\x00[\x01\xe8\xc5\
-\xd9G\xfaN`\xd8\x81I\xed\x8c\xb19\x94\x8d\xcbL\x00;t\xcf\x9fwPh\xdb\x0e\xe8\
-\xd3,\x17\x8b\xc7\x9d\xbb>\x8a \xec5\x94\tc\xc4\x12\xab\x94\xeb\x7fkWr\xc9B%\
-\xfc\xd2\xfcM<\x01\xf6tn\x12O3c\xe6\x00\x00\x00\x00IEND\xaeB`\x82' 
+\x00\x00\xcdIDAT8\x8d\xa5\x93\xd1\r\xc20\x0cD\xef\xec,\xc0b\x88\x8d`$\x06Cb\
+\x81\xc6\xc7GI\xeb\x94RZq?U"\xdby\xe7SIs\xfc#\xfbU\xa0\xa8\xba\xc6\xa0og\xee\
+!P\xd4y\x80\x04\xf3\xc2U\x82{\x9ct\x8f\x93\xb0\xa2\xdbm\xf5\xba\'h\xcdg=`\
+\xeeTT\xd1\xc6o& \t\x9a\x13\x00J\x9ev\xb1\'\xa3~\x14+\xbfN\x12\x92\x00@\xe6\
+\x85\xdd\x00\x000w\xe6\xe2\xde\xc7|\xdf\x08\xba\x1d(\xaa2n+\xca\xcd\x8d,\xea\
+\x98\xc4\x07\x01\x00D\x1dd^\xa8\xa8j\x9ew\xed`\xa9\x16\x99\xde\xa6G\x8b\xd3Y\
+\xe6\x85]\n\r\x7f\x99\xf5\x96Jnlz#\xab\xdb\xc1\x17\x19\xb0XV\xc2\xdf\xa3)\
+\x85<\xe4\x88\x85.F\x9a\xf3H3\xb0\xf3g\xda\xd2\x0b\xc5_|\x17\xe8\xf5R\xd6\
+\x00\x00\x00\x00IEND\xaeB`\x82' 
 
 def getContinueBitmap():
     return BitmapFromImage(getContinueImage())
@@ -2265,12 +2463,12 @@ def getStepInIcon():
 #----------------------------------------------------------------------
 def getStopData():
     return \
-"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
+'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
 \x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
-\x00\x00FIDAT8\x8d\xed\x91\xc1\t\xc00\x0c\x03O!\x0b\xa9\xfb\xef\xa6\xfcB\xa1\
-N\t\xf4Wr\xa0\x8f\xb1\x0f\x81\xe1\x97\xe4-\xb6}_V%\xc8\xc2, \t\x92\xe6]\xfbZ\
-\xf7\x08\xa0W\xc3\xea5\xdb\rl_IX\xe5\xf0d\x00\xfa\x8d#\x7f\xc4\xf7'\xab\x00\
-\x00\x00\x00IEND\xaeB`\x82" 
+\x00\x00QIDAT8\x8d\xdd\x93A\n\xc00\x08\x04g\xb5\xff\x7fq\x13sn\xda&\x01\x0b\
+\xa5]\xf0"\xec(.J\xe6dd)\xf7\x13\x80\xadoD-12\xc8\\\xd3\r\xe2\xa6\x00j\xd9\
+\x0f\x03\xde\xbf\xc1\x0f\x00\xa7\x18\x01t\xd5\\\x05\xc8\\}T#\xe9\xfb\xbf\x90\
+\x064\xd8\\\x12\x1fQM\xf5\xd9\x00\x00\x00\x00IEND\xaeB`\x82' 
 
 def getStopBitmap():
     return BitmapFromImage(getStopImage())