예제 #1
0
파일: mgui.py 프로젝트: Vivek-sagar/moose-1
 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
예제 #2
0
 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)
예제 #3
0
파일: pyQTShell.py 프로젝트: mfitzp/toolz
    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)
예제 #4
0
파일: mgui.py 프로젝트: physicalist/moose
 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