Changeset fb58234 in sasview
- Timestamp:
- Nov 28, 2011 1:35:21 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 056b569
- Parents:
- 61f557b
- Location:
- calculatorview/src/sans/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/calculator.py
rfdc3cb0 rfb58234 66 66 ("SANS Resolution Estimator", 67 67 resolution_help, self.on_calculate_resoltuion), 68 ("Python Shell ", pyconsole_help, self.on_python_console)]68 ("Python Shell/Editor", pyconsole_help, self.on_python_console)] 69 69 70 70 def on_edit_data(self, event): … … 133 133 :param event: menu event 134 134 """ 135 self.get_python_panel(filename=None) 136 137 def get_python_panel(self, filename=None): 138 """ 139 Get the python shell panel 140 141 :param filename: file name to open in editor 142 """ 135 143 from pyconsole import PyConsole 136 frame = PyConsole(parent=self.parent )144 frame = PyConsole(parent=self.parent, filename=filename) 137 145 self.put_icon(frame) 138 146 frame.Show(True) 139 147 140 148 def put_icon(self, frame): 141 149 """ -
calculatorview/src/sans/perspectives/calculator/pyconsole.py
rb1bda35 rfb58234 2 2 Console Module display Python console 3 3 """ 4 import sys 4 5 import wx 5 import wx.py.crust 6 import sys 7 6 #import wx.py.crust as crust 7 import wx.py.editor as editor 8 8 if sys.platform.count("win32")>0: 9 9 PANEL_WIDTH = 800 … … 15 15 FONT_VARIANT = 1 16 16 17 class PyConsole( wx.py.crust.CrustFrame):17 class PyConsole(editor.EditorNotebookFrame): 18 18 ## Internal nickname for the window, used by the AUI manager 19 window_name = "Python Shell "19 window_name = "Python Shell/Editor" 20 20 ## Name to appear on the window title bar 21 window_caption = "Python Shell "21 window_caption = "Python Shell/Editor" 22 22 ## Flag to tell the AUI manager to put this panel in the center pane 23 23 CENTER_PANE = False 24 24 def __init__(self, parent=None, manager=None, 25 title='Python Shell ',25 title='Python Shell/Editor', filename=None, 26 26 size=(PANEL_WIDTH, PANEL_HEIGHT)): 27 if parent != None: 28 dataDir = parent._default_save_location 29 else: 30 dataDir = None 31 wx.py.crust.CrustFrame.__init__(self, parent=parent, 27 #if parent != None: 28 # dataDir = parent._default_save_location 29 #else: 30 # dataDir = None 31 #wx.py.crust.CrustFrame.__init__(self, parent=parent, 32 # title=title, size=size, 33 # dataDir=dataDir) 34 self.config = None 35 editor.EditorNotebookFrame.__init__(self, parent=parent, 32 36 title=title, size=size, 33 dataDir=dataDir)37 filename=filename) 34 38 self._import_site() 35 39 self.parent = parent … … 57 61 wx.OK|wx.ICON_INFORMATION) 58 62 dial.ShowModal() 59 63 60 64 ABOUT = "Welcome to Python %s! \n\n"% sys.version.split()[0] 61 ABOUT += "This uses Py CrustShell in wx (developed by Patrick K. O'Brien).\n"65 ABOUT += "This uses Py Shell in wx (developed by Patrick K. O'Brien).\n" 62 66 ABOUT += "If this is your first time using Python, \n" 63 67 ABOUT += "you should definitely check out the tutorial "
Note: See TracChangeset
for help on using the changeset viewer.