def getShellWidget(self): """Create an instance of shell widget. This can be either a QSciQScintialla widget or a PyCute widget (extends QTextArea) if the first is not available""" if not hasattr(self, 'shellWidget') or self.shellWidget is None: self.shellWidget = get_shell_class()(code.InteractiveInterpreter(), message='MOOSE version %s' % (moose._moose.__version__)) self.shellWidget.interpreter.runsource('from moose import *') self.shellWidget.setVisible(False) return self.shellWidget
def __addWidgets__(self): '''adds all of the custom widgets not specified in the .ui file''' #interpreter = Interpreter(self.localVars.__dict__)#original interpreter = Interpreter(self.varDict) #interpreter = Interpreter() shellClass = shell.get_shell_class() self.shell = shellClass(interpreter,parent=self.ui.pyDockWidget) self.shell.setObjectName("shell") self.ui.pyDockWidget.setWidget(self.shell)
def __addWidgets__(self): '''adds all of the custom widgets not specified in the .ui file''' #interpreter = Interpreter(self.localVars.__dict__)#original interpreter = Interpreter(self.varDict) #interpreter = Interpreter() shellClass = shell.get_shell_class() self.shell = shellClass(interpreter, parent=self.ui.pyDockWidget) self.shell.setObjectName("shell") self.ui.pyDockWidget.setWidget(self.shell)
def getShellWidget(self): """Create an instance of shell widget. This can be either a QSciQScintialla widget or a PyCute widget (extends QTextArea) if the first is not available""" if not hasattr(self, 'shellWidget') or self.shellWidget is None: self.shellWidget = get_shell_class()( code.InteractiveInterpreter() , message='MOOSE version %s' % (moose._moose.__version__) ) self.shellWidget.interpreter.runsource('from moose import *') self.shellWidget.setVisible(False) return self.shellWidget