コード例 #1
0
ファイル: internalshell.py プロジェクト: 0xBADCA7/spyder
 def setup_context_menu(self):
     """Reimplement PythonShellWidget method"""
     PythonShellWidget.setup_context_menu(self)
     self.help_action = create_action(self, _("Help..."),
                        icon=ima.icon('DialogHelpButton'),
                        triggered=self.help)
     self.menu.addAction(self.help_action)
コード例 #2
0
 def setup_context_menu(self):
     """Reimplement PythonShellWidget method"""
     PythonShellWidget.setup_context_menu(self)
     self.help_action = create_action(self, _("Help..."),
                        icon=ima.icon('DialogHelpButton'),
                        triggered=self.help)
     self.menu.addAction(self.help_action)
コード例 #3
0
ファイル: pythonshell.py プロジェクト: yashtawade/spyder
 def __init__(self, parent, history_filename, profile=False):
     initial_message = _("NOTE: The Python console is going to "
                         "be REMOVED in Spyder 3.2. Please start "
                         "to migrate your work to the "
                         "IPython console instead.\n\n")
     PythonShellWidget.__init__(self, parent, history_filename, profile,
                                initial_message=initial_message)
     self.path = []
コード例 #4
0
ファイル: internalshell.py プロジェクト: pandaroot/spyder
    def __init__(self,
                 parent=None,
                 namespace=None,
                 commands=[],
                 message=None,
                 max_line_count=300,
                 font=None,
                 exitfunc=None,
                 profile=False,
                 multithreaded=True,
                 light_background=True):
        PythonShellWidget.__init__(self, parent,
                                   get_conf_path('history_internal.py'),
                                   profile)

        self.set_light_background(light_background)
        self.multithreaded = multithreaded
        self.setMaximumBlockCount(max_line_count)

        # For compatibility with ExtPythonShellWidget
        self.is_ipykernel = False

        if font is not None:
            self.set_font(font)

        # Allow raw_input support:
        self.input_loop = None
        self.input_mode = False

        # KeyboardInterrupt support
        self.interrupted = False  # used only for not-multithreaded mode
        self.sig_keyboard_interrupt.connect(self.keyboard_interrupt)

        # Code completion / calltips
        getcfg = lambda option: CONF.get('internal_console', option)
        case_sensitive = getcfg('codecompletion/case_sensitive')
        self.set_codecompletion_case(case_sensitive)

        # keyboard events management
        self.eventqueue = []

        # Init interpreter
        self.exitfunc = exitfunc
        self.commands = commands
        self.message = message
        self.interpreter = None
        self.start_interpreter(namespace)

        # Clear status bar
        self.status.emit('')

        # Embedded shell -- requires the monitor (which installs the
        # 'open_in_spyder' function in builtins)
        if hasattr(builtins, 'open_in_spyder'):
            self.go_to_error.connect(self.open_with_external_spyder)
コード例 #5
0
ファイル: internalshell.py プロジェクト: jitseniesen/spyder
    def __init__(
        self,
        parent=None,
        namespace=None,
        commands=[],
        message=None,
        max_line_count=300,
        font=None,
        exitfunc=None,
        profile=False,
        multithreaded=True,
        light_background=True,
    ):
        PythonShellWidget.__init__(self, parent, get_conf_path("history_internal.py"), profile)

        self.set_light_background(light_background)
        self.multithreaded = multithreaded
        self.setMaximumBlockCount(max_line_count)

        if font is not None:
            self.set_font(font)

        # Allow raw_input support:
        self.input_loop = None
        self.input_mode = False

        # KeyboardInterrupt support
        self.interrupted = False  # used only for not-multithreaded mode
        self.sig_keyboard_interrupt.connect(self.keyboard_interrupt)

        # Code completion / calltips
        getcfg = lambda option: CONF.get("internal_console", option)
        case_sensitive = getcfg("codecompletion/case_sensitive")
        self.set_codecompletion_case(case_sensitive)

        # keyboard events management
        self.eventqueue = []

        # Init interpreter
        self.exitfunc = exitfunc
        self.commands = commands
        self.message = message
        self.interpreter = None
        self.start_interpreter(namespace)

        # Clear status bar
        self.status.emit("")

        # Embedded shell -- requires the monitor (which installs the
        # 'open_in_spyder' function in builtins)
        if hasattr(builtins, "open_in_spyder"):
            self.go_to_error.connect(self.open_with_external_spyder)
コード例 #6
0
 def flush(self, error=False, prompt=False):
     """Reimplement ShellBaseWidget method"""
     PythonShellWidget.flush(self, error=error, prompt=prompt)
     if self.interrupted:
         self.interrupted = False
         raise KeyboardInterrupt
コード例 #7
0
ファイル: pythonshell.py プロジェクト: rlugojr/spyder-1
 def __init__(self, parent, history_filename, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename, profile)
     self.path = []
コード例 #8
0
ファイル: pythonshell.py プロジェクト: ShenggaoZhu/spyder
 def __init__(self, parent, history_filename, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename, profile)
     self.path = []
コード例 #9
0
ファイル: internalshell.py プロジェクト: jitseniesen/spyder
 def flush(self, error=False, prompt=False):
     """Reimplement ShellBaseWidget method"""
     PythonShellWidget.flush(self, error=error, prompt=prompt)
     if self.interrupted:
         self.interrupted = False
         raise KeyboardInterrupt