Index: calculatorview/src/sans/perspectives/calculator/pyconsole.py
===================================================================
--- calculatorview/src/sans/perspectives/calculator/pyconsole.py	(revision 4c5448c1ba6dcb9becb07814a5710e99c061b555)
+++ calculatorview/src/sans/perspectives/calculator/pyconsole.py	(revision 7c8d3093945ee0f295c2b919d7b23f654f80158c)
@@ -12,9 +12,9 @@
 if sys.platform.count("win32")>0:
     PANEL_WIDTH = 800
-    PANEL_HEIGHT = 600
+    PANEL_HEIGHT = 700
     FONT_VARIANT = 0
 else:
     PANEL_WIDTH = 830
-    PANEL_HEIGHT = 620
+    PANEL_HEIGHT = 730
     FONT_VARIANT = 1
 ID_COMPILE = wx.NewId() 
@@ -59,5 +59,6 @@
         self.dataDir = dataDir
         self.Centre()
-        self.fileMenu.FindItemById(wx.ID_NEW).Enable(False)
+        
+        self.Bind(wx.EVT_MENU, self.OnNewFile, id=wx.ID_NEW)
         self.Bind(wx.EVT_MENU, self.OnOpenFile, id=wx.ID_OPEN)
         self.Bind(wx.EVT_MENU, self.OnSaveFile, id=wx.ID_SAVE)
@@ -67,5 +68,10 @@
         self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateCompileMenu, id=ID_COMPILE)
         self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateCompileMenu, id=ID_RUN)
-        
+        if not title.count('Python Shell'):
+            # Delete menu item (open and new) if not python shell
+            self.fileMenu.Delete(wx.ID_NEW)
+            self.fileMenu.Delete(wx.ID_OPEN)
+        
+   
     def _add_menu(self):
         """
@@ -76,7 +82,7 @@
                  'Compile the file')
         self.compileMenu.AppendSeparator()
-        self.compileMenu.Append(ID_RUN, 'Run',
+        self.compileMenu.Append(ID_RUN, 'Run in Shell',
                  'Run the file in the Python Shell')
-        self.MenuBar.Insert(3, self.compileMenu, '&Compile')
+        self.MenuBar.Insert(3, self.compileMenu, '&Run')
     
     def OnHelp(self, event):
@@ -109,4 +115,10 @@
                            wx.OK|wx.ICON_INFORMATION)  
         dial.ShowModal()
+        
+    def OnNewFile(self, event):
+        """
+        OnFileOpen  
+        """
+        self.OnFileNew(event)
 
     def OnOpenFile(self, event):
@@ -134,12 +146,32 @@
         self.Show(True)
 
-    def bufferSaveAs(self):
-        """
-        Save buffer to a new filename: Bypass the annoying suggest save 
-        """
+    def bufferOpen(self):
+        """
+        Open file in buffer, bypassing editor bufferOpen
+        """
+        if self.bufferHasChanged():
+            cancel = self.bufferSuggestSave()
+            if cancel:
+                return cancel
         filedir = ''
         if self.buffer and self.buffer.doc.filedir:
             filedir = self.buffer.doc.filedir
-        result = editor.saveSingle(directory=filedir)
+        result = editor.openSingle(directory=filedir,  
+                            wildcard='Python Files (*.py)|*.py')
+        if result.path:
+            self.bufferCreate(result.path)
+        cancel = False
+        return cancel
+    
+    def bufferSaveAs(self):
+        """
+        Save buffer to a new filename: Bypassing editor bufferSaveAs
+        """
+        filedir = ''
+        if self.buffer and self.buffer.doc.filedir:
+            filedir = self.buffer.doc.filedir
+        result = editor.saveSingle(directory=filedir, 
+                                   filename='untitled.py',
+                                   wildcard='Python Files (*.py)|*.py')
         if result.path:
             self.buffer.saveAs(result.path)
@@ -148,4 +180,5 @@
             cancel = True
         return cancel
+    
     
     def update_custom_combo(self):
@@ -176,8 +209,8 @@
             # Why we have to do this (Otherwise problems on Windows)?
             forward_path = self.buffer.doc.filepath.replace('\\', '/')
-            self.shell.Execute("execfile('%s')"% forward_path)
+            self.shell.Execute("execfile('%s')"% forward_path) 
             self.shell.Hide()
             self.shell.Show(True)
-            self.shell.SetFocus()
+            return self.shell.GetText().split(">>>")[-2]
         else:
             mssg = "\n This is not a python file."
@@ -185,4 +218,5 @@
             icon = wx.ICON_ERROR
             wx.MessageBox(str(mssg), title, style=icon)
+            return 0
         
     def OnCompile(self, event):
@@ -192,7 +226,8 @@
         if self._check_changed():
             return True
-        if self._get_err_msg():
+        run_out = self.OnRun(None)
+        if self._get_err_msg(run_out):
             if self._manager != None and self.panel != None:
-                self._manager.set_edit_menu(self.parent)
+                self._manager.set_edit_menu_helper(self.parent)
                 wx.CallAfter(self.update_custom_combo)
     
@@ -206,5 +241,5 @@
                 return cancel
              
-    def _get_err_msg(self):
+    def _get_err_msg(self, text=''):
         """
         Get err_msg
@@ -229,9 +264,15 @@
         if msg != None:
             mssg += "Error occurred:\n"
-            mssg += str(msg)
-            title = 'Warning'
-            icon = wx.ICON_WARNING
+            mssg += str(msg) + "\n\n"
+            if text:
+                mssg += "Run-Test results:\n"
+                mssg += str(text)
+                title = 'Warning'
+                icon = wx.ICON_WARNING
         else:
-            mssg += "Successful."
+            mssg += "Successful.\n\n"
+            if text:
+                mssg += "Run-Test results:\n"
+                mssg += str(text)
             title = 'Info'
             icon = wx.ICON_INFORMATION
