Beispiel #1
0
 def __init__(self, parent):
     PydocBrowser.__init__(self, parent)
     SpyderPluginMixin.__init__(self, parent)
     
     self.set_zoom_factor(CONF.get(self.ID, 'zoom_factor'))
     self.url_combo.setMaxCount(CONF.get(self.ID, 'max_history_entries'))
     self.url_combo.addItems( self.load_history() )
Beispiel #2
0
    def __init__(self, parent=None):
        supported_encodings = self.get_option('supported_encodings')

        search_path = self.get_option('search_path', None)
        self.search_text_samples = self.get_option('search_text_samples')
        search_text = self.get_option('search_text')
        search_text = [txt for txt in search_text \
                       if txt not in self.search_text_samples]
        search_text += self.search_text_samples

        search_text_regexp = self.get_option('search_text_regexp')
        include = self.get_option('include')
        if not include:
            include = self.include_patterns()
        include_idx = self.get_option('include_idx', None)
        include_regexp = self.get_option('include_regexp')
        exclude = self.get_option('exclude')
        exclude_idx = self.get_option('exclude_idx', None)
        exclude_regexp = self.get_option('exclude_regexp')
        in_python_path = self.get_option('in_python_path')
        more_options = self.get_option('more_options')
        FindInFilesWidget.__init__(self, parent, search_text,
                                   search_text_regexp, search_path, include,
                                   include_idx, include_regexp, exclude,
                                   exclude_idx, exclude_regexp,
                                   supported_encodings, in_python_path,
                                   more_options)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.toggle_visibility.connect(self.toggle)
    def __init__(self, parent=None):
        BreakpointWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
        self.set_data()
Beispiel #4
0
 def __init__(self, parent=None):
     BreakpointWidget.__init__(self, parent=parent)
     SpyderPluginMixin.__init__(self, parent)
     
     # Initialize plugin
     self.initialize_plugin()
     self.set_data()
Beispiel #5
0
    def __init__(self, parent):
        QStackedWidget.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)
        self.shellwidgets = {}

        # Initialize plugin
        self.initialize_plugin()
Beispiel #6
0
 def __init__(self, parent=None):
     supported_encodings = self.get_option('supported_encodings')
     
     search_path = self.get_option('search_path', None)        
     self.search_text_samples = self.get_option('search_text_samples')
     search_text = self.get_option('search_text')
     search_text = [txt for txt in search_text \
                    if txt not in self.search_text_samples]
     search_text += self.search_text_samples
     
     search_text_regexp = self.get_option('search_text_regexp')
     include = self.get_option('include')
     include_idx = self.get_option('include_idx', None)
     include_regexp = self.get_option('include_regexp')
     exclude = self.get_option('exclude')
     exclude_idx = self.get_option('exclude_idx', None)
     exclude_regexp = self.get_option('exclude_regexp')
     in_python_path = self.get_option('in_python_path')
     more_options = self.get_option('more_options')
     FindInFilesWidget.__init__(self, parent,
                                search_text, search_text_regexp, search_path,
                                include, include_idx, include_regexp,
                                exclude, exclude_idx, exclude_regexp,
                                supported_encodings,
                                in_python_path, more_options)
     SpyderPluginMixin.__init__(self, parent)
     
     # Initialize plugin
     self.initialize_plugin()
     
     self.connect(self, SIGNAL('toggle_visibility(bool)'), self.toggle)
Beispiel #7
0
 def __init__(self, parent=None):
     PylintWidget.__init__(self, parent=parent,
                           max_entries=self.get_option('max_entries', 50))
     SpyderPluginMixin.__init__(self, parent)
     
     # Initialize plugin
     self.initialize_plugin()
Beispiel #8
0
    def __init__(self, parent):
        QStackedWidget.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)
        self.shellwidgets = {}

        # Initialize plugin
        self.initialize_plugin()
Beispiel #9
0
 def __init__(self, parent=None):
     ProfilerWidget.__init__(self, parent=parent,
                           max_entries=self.get_option('max_entries', 50))
     SpyderPluginMixin.__init__(self, parent)
     
     # Initialize plugin
     self.initialize_plugin()
    def __init__(self, parent=None):
        QWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)
        layout = QVBoxLayout()
        self.setLayout(layout)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #11
0
    def __init__(self, context, parent=None, index=0):
        SpectracerWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        self.index = index
        # Initialize plugin
        self.initialize_plugin()
        self.chart_manager = ChartManager(context, self.chart)
    def __init__(self, parent=None):
        QWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)
        layout = QVBoxLayout()
        self.setLayout(layout)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #13
0
    def __init__(self, parent=None):
        ExplorerWidget.__init__(self, parent=parent,
                                name_filters=self.get_option('name_filters'),
                                show_all=self.get_option('show_all'),
                                show_icontext=self.get_option('show_icontext'))
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
    def __init__(self, parent=None):
        CondaPackagesWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        self.root_env = 'root'
        self._prefix_to_set = self.get_environment_prefix()

        # Initialize plugin
        self.initialize_plugin()
    def __init__(self, parent=None):
        CondaPackagesWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        self.root_env = 'root'
        self._env_to_set = self.get_active_env()

        # Initialize plugin
        self.initialize_plugin()
Beispiel #16
0
    def __init__(self, parent=None):
        ProjectExplorerWidget.__init__(self, parent=parent,
                    name_filters=self.get_option('name_filters'),
                    show_all=self.get_option('show_all', False),
                    show_hscrollbar=self.get_option('show_hscrollbar'))
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.treewidget.header().hide()
        self.set_font(self.get_plugin_font())
        self.load_config()
Beispiel #17
0
    def __init__(self, parent):
        self.main = parent
        PydocBrowser.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.register_widget_shortcuts("Editor", self.find_widget)
        
        self.webview.set_zoom_factor(self.get_option('zoom_factor'))
        self.url_combo.setMaxCount(self.get_option('max_history_entries'))
        self.url_combo.addItems( self.load_history() )
Beispiel #18
0
    def __init__(self, parent=None):
        ExplorerWidget.__init__(self, parent=parent,
                                name_filters=self.get_option('name_filters'),
                                valid_types=VALID_EXT,
                                show_all=self.get_option('show_all'),
                                show_toolbar=self.get_option('show_toolbar'),
                                show_icontext=self.get_option('show_icontext'))
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
        
        self.set_font(self.get_plugin_font())
Beispiel #19
0
    def __init__(self, parent=None):
        ProjectExplorerWidget.__init__(self, parent=parent,
                            name_filters=self.get_option('name_filters'),
                            valid_types=VALID_EXT,
                            show_all=self.get_option('show_all', False))
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.treewidget.header().hide()
        self.set_font(self.get_plugin_font())
        self.load_config()
Beispiel #20
0
    def __init__(self, parent):
        self.main = parent
        PydocBrowser.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.register_widget_shortcuts("Editor", self.find_widget)
        
        self.webview.set_zoom_factor(self.get_option('zoom_factor'))
        self.url_combo.setMaxCount(self.get_option('max_history_entries'))
        self.url_combo.addItems( self.load_history() )
Beispiel #21
0
    def __init__(self, parent=None):
        ExplorerWidget.__init__(
            self,
            parent=parent,
            name_filters=self.get_option("name_filters"),
            show_all=self.get_option("show_all"),
            show_icontext=self.get_option("show_icontext"),
        )
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.set_font(self.get_plugin_font())
Beispiel #22
0
    def __init__(self, parent=None):
        ExplorerWidget.__init__(self,
                                parent=parent,
                                name_filters=self.get_option('name_filters'),
                                valid_types=VALID_EXT,
                                show_all=self.get_option('show_all'),
                                show_toolbar=self.get_option('show_toolbar'),
                                show_icontext=self.get_option('show_icontext'))
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.set_font(self.get_plugin_font())
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)

        # Widgets
        self.stack = QStackedWidget(self)
        self.shellwidgets = {}

        # Layout
        layout = QVBoxLayout()
        layout.addWidget(self.stack)
        self.setLayout(layout)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #24
0
    def __init__(self, parent=None):
        ExplorerWidget.__init__(self, parent=parent,
                            path=CONF.get(self.ID, 'path', None),
                            name_filters=CONF.get(self.ID, 'name_filters'),
                            valid_types=CONF.get(self.ID, 'valid_filetypes'),
                            show_all=CONF.get(self.ID, 'show_all'),
                            show_toolbar=CONF.get(self.ID, 'show_toolbar'),
                            show_icontext=CONF.get(self.ID, 'show_icontext'))
        SpyderPluginMixin.__init__(self, parent)

        self.editor_valid_types = None
        
        self.set_font(get_font(self.ID))
        
        self.connect(self, SIGNAL("open_file(QString)"), self.open_file)
Beispiel #25
0
    def __init__(self, parent=None):

        self.configCls = PyfabConfigStandalone
        PyfabConfigSpyder.plugin = self
        self.config = self
        PyfabConfigSpyder.__init__(self)

        pyfab_app.Autolayout.__init__(self)
        self.AppCls = qapplication().__class__
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.raise_()  #useless
Beispiel #26
0
  def __init__(self, parent=None):

    self.configCls = PyfabConfigStandalone
    PyfabConfigSpyder.plugin = self
    self.config = self
    PyfabConfigSpyder.__init__(self)

    pyfab_app.Autolayout.__init__(self)
    self.AppCls = qapplication().__class__
    SpyderPluginMixin.__init__(self, parent)

    # Initialize plugin
    self.initialize_plugin()

    self.raise_() #useless
Beispiel #27
0
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)

        # Widgets
        self.stack = QStackedWidget(self)
        self.shellwidgets = {}

        # Layout
        layout = QVBoxLayout()
        layout.addWidget(self.stack)
        self.setLayout(layout)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #28
0
    def __init__(self, parent=None, fullpath_sorting=True):
        show_fullpath = self.get_option('show_fullpath')
        show_all_files = self.get_option('show_all_files')
        show_comments = self.get_option('show_comments')
        OutlineExplorerWidget.__init__(self, parent=parent,
                                       show_fullpath=show_fullpath,
                                       fullpath_sorting=fullpath_sorting,
                                       show_all_files=show_all_files,
                                       show_comments=show_comments)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
        
        self.treewidget.header().hide()
        self.load_config()
Beispiel #29
0
    def __init__(self, parent=None):
        channels = self.get_option('channels', ['anaconda', 'spyder-ide'])
        active_channels = self.get_option('active_channels',
                                          ['anaconda', 'spyder-ide'])
        CondaPackagesWidget.__init__(self,
                                     parent=parent,
                                     channels=channels,
                                     active_channels=active_channels,
                                     )
        SpyderPluginMixin.__init__(self, parent)

        self.root_env = 'root'
        self._prefix_to_set = self.get_environment_prefix()

        # Initialize plugin
        self.initialize_plugin()
Beispiel #30
0
    def __init__(self, parent=None, fullpath_sorting=True):
        show_fullpath = self.get_option('show_fullpath')
        show_all_files = self.get_option('show_all_files')
        show_comments = self.get_option('show_comments')
        OutlineExplorerWidget.__init__(self, parent=parent,
                                       show_fullpath=show_fullpath,
                                       fullpath_sorting=fullpath_sorting,
                                       show_all_files=show_all_files,
                                       show_comments=show_comments)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
        
        self.treewidget.header().hide()
        self.load_config()
Beispiel #31
0
    def __init__(self, parent=None):
        self.new_project_action = None
        include = CONF.get(self.ID, 'include', '.')
        exclude = CONF.get(self.ID, 'exclude', r'\.pyc$|\.pyo$|\.orig$|^\.')
        show_all = CONF.get(self.ID, 'show_all', False)
        ProjectExplorerWidget.__init__(self, parent=parent, include=include,
                                       exclude=exclude, show_all=show_all)
        SpyderPluginMixin.__init__(self, parent)

        self.editor_valid_types = None

        self.set_font(get_font(self.ID))
        
        if osp.isfile(self.DATAPATH):
            self.load_config()

        self.connect(self, SIGNAL("open_file(QString)"), self.open_file)
Beispiel #32
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     if enable and not self.is_server_running():
         self.initialize()
Beispiel #33
0
 def __init__(self, parent=None):
     ProfilerWidget.__init__(self, parent=parent,
                           max_entries=self.get_option('max_entries', 50))
     SpyderPluginMixin.__init__(self, parent)
Beispiel #34
0
 def switch_to_plugin(self):
     """Switch to plugin
     This method is called when pressing plugin's shortcut key"""
     self.findinfiles_callback()  # Necessary at least with PyQt5 on Windows
     SpyderPluginMixin.switch_to_plugin(self)
Beispiel #35
0
 def __init__(self, parent):
     QStackedWidget.__init__(self, parent)
     SpyderPluginMixin.__init__(self, parent)
     self.shellwidgets = {}
Beispiel #36
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     if enable and not self.is_server_running():
         self.initialize()
Beispiel #37
0
 def switch_to_plugin(self):
     """Switch to plugin
     This method is called when pressing plugin's shortcut key"""
     self.findinfiles_callback()  # Necessary at least with PyQt5 on Windows
     SpyderPluginMixin.switch_to_plugin(self)
Beispiel #38
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     for nsb in self.shellwidgets.values():
         nsb.visibility_changed(enable and nsb is self.currentWidget())
Beispiel #39
0
    def __init__(self, parent=None):
        PylintWidget.__init__(self, parent=parent,
                              max_entries=CONF.get(self.ID, 'max_entries'))
        SpyderPluginMixin.__init__(self, parent)

        self.set_font(get_font(self.ID))
    def __init__(self, parent, workdir=None):
        QToolBar.__init__(self, parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
        
        self.setWindowTitle(self.get_plugin_title()) # Toolbar title
        self.setObjectName(self.get_plugin_title()) # Used to save Window state
        
        # Previous dir action
        self.history = []
        self.histindex = None
        self.previous_action = create_action(self, "previous", None,
                                     get_icon('previous.png'), _('Back'),
                                     triggered=self.previous_directory)
        self.addAction(self.previous_action)
        
        # Next dir action
        self.history = []
        self.histindex = None
        self.next_action = create_action(self, "next", None,
                                     get_icon('next.png'), _('Next'),
                                     triggered=self.next_directory)
        self.addAction(self.next_action)
        
        # Enable/disable previous/next actions
        self.connect(self, SIGNAL("set_previous_enabled(bool)"),
                     self.previous_action.setEnabled)
        self.connect(self, SIGNAL("set_next_enabled(bool)"),
                     self.next_action.setEnabled)
        
        # Path combo box
        adjust = self.get_option('working_dir_adjusttocontents')
        self.pathedit = PathComboBox(self, adjust_to_contents=adjust)
        self.pathedit.setToolTip(_("This is the working directory for newly\n"
                               "opened consoles (Python/IPython consoles and\n"
                               "terminals), for the file explorer, for the\n"
                               "find in files plugin and for new files\n"
                               "created in the editor"))
        self.connect(self.pathedit, SIGNAL("open_dir(QString)"), self.chdir)
        self.pathedit.setMaxCount(self.get_option('working_dir_history'))
        wdhistory = self.load_wdhistory( workdir )
        if workdir is None:
            if self.get_option('startup/use_last_directory'):
                if wdhistory:
                    workdir = wdhistory[0]
                else:
                    workdir = "."
            else:
                workdir = self.get_option('startup/fixed_directory', ".")
                if not osp.isdir(workdir):
                    workdir = "."
        self.chdir(workdir)
        self.pathedit.addItems( wdhistory )
        self.refresh_plugin()
        self.addWidget(self.pathedit)
        
        # Browse action
        browse_action = create_action(self, "browse", None,
                                      get_std_icon('DirOpenIcon'),
                                      _('Browse a working directory'),
                                      triggered=self.select_directory)
        self.addAction(browse_action)
        
        # Set current console working directory action
        setwd_action = create_action(self, icon=get_icon('set_workdir.png'),
                                     text=_("Set as current console's "
                                                  "working directory"),
                                     triggered=self.set_as_current_console_wd)
        self.addAction(setwd_action)
        
        # Parent dir action
        parent_action = create_action(self, "parent", None,
                                      get_icon('up.png'),
                                      _('Change to parent directory'),
                                      triggered=self.parent_directory)
        self.addAction(parent_action)
Beispiel #41
0
    def __init__(self, parent=None):
        ExampleWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     if enable:
         self.emit(SIGNAL("outlineexplorer_is_visible()"))
Beispiel #43
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     for nsb in list(self.shellwidgets.values()):
         nsb.visibility_changed(enable and nsb is self.current_widget())
    def __init__(self, parent=None):
        MemoryProfilerWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #45
0
    def __init__(self, parent, workdir=None, **kwds):
        if PYQT5:
            super(WorkingDirectory, self).__init__(parent, **kwds)
        else:
            QToolBar.__init__(self, parent)
            SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.setWindowTitle(self.get_plugin_title())  # Toolbar title
        self.setObjectName(
            self.get_plugin_title())  # Used to save Window state

        # Previous dir action
        self.history = []
        self.histindex = None
        self.previous_action = create_action(self,
                                             "previous",
                                             None,
                                             ima.icon('previous'),
                                             _('Back'),
                                             triggered=self.previous_directory)
        self.addAction(self.previous_action)

        # Next dir action
        self.history = []
        self.histindex = None
        self.next_action = create_action(self,
                                         "next",
                                         None,
                                         ima.icon('next'),
                                         _('Next'),
                                         triggered=self.next_directory)
        self.addAction(self.next_action)

        # Enable/disable previous/next actions
        self.set_previous_enabled.connect(self.previous_action.setEnabled)
        self.set_next_enabled.connect(self.next_action.setEnabled)

        # Path combo box
        adjust = self.get_option('working_dir_adjusttocontents')
        self.pathedit = PathComboBox(self, adjust_to_contents=adjust)
        self.pathedit.setToolTip(
            _("This is the working directory for newly\n"
              "opened consoles (Python/IPython consoles and\n"
              "terminals), for the file explorer, for the\n"
              "find in files plugin and for new files\n"
              "created in the editor"))
        self.pathedit.open_dir.connect(self.chdir)
        self.pathedit.setMaxCount(self.get_option('working_dir_history'))
        wdhistory = self.load_wdhistory(workdir)
        if workdir is None:
            if self.get_option('startup/use_last_directory'):
                if wdhistory:
                    workdir = wdhistory[0]
                else:
                    workdir = "."
            else:
                workdir = self.get_option('startup/fixed_directory', ".")
                if not osp.isdir(workdir):
                    workdir = "."
        self.chdir(workdir)
        self.pathedit.addItems(wdhistory)
        self.refresh_plugin()
        self.addWidget(self.pathedit)

        # Browse action
        browse_action = create_action(self,
                                      "browse",
                                      None,
                                      ima.icon('DirOpenIcon'),
                                      _('Browse a working directory'),
                                      triggered=self.select_directory)
        self.addAction(browse_action)

        # Set current console working directory action
        setwd_action = create_action(self,
                                     icon=ima.icon('set_workdir'),
                                     text=_("Set as current console's "
                                            "working directory"),
                                     triggered=self.set_as_current_console_wd)
        self.addAction(setwd_action)

        # Parent dir action
        parent_action = create_action(self,
                                      "parent",
                                      None,
                                      ima.icon('up'),
                                      _('Change to parent directory'),
                                      triggered=self.parent_directory)
        self.addAction(parent_action)
Beispiel #46
0
    def __init__(self, parent=None):
        CondaPackagesWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #47
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     SpyderPluginMixin.visibility_changed(self, enable)
     if enable:
         self.outlineexplorer_is_visible.emit()
Beispiel #48
0
    def __init__(self, parent, workdir=None, **kwds):
        if PYQT5:
            super(WorkingDirectory, self).__init__(parent, **kwds)
        else:
            QToolBar.__init__(self, parent)
            SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()

        self.setWindowTitle(self.get_plugin_title())  # Toolbar title
        self.setObjectName(self.get_plugin_title())  # Used to save Window state

        # Previous dir action
        self.history = []
        self.histindex = None
        self.previous_action = create_action(
            self, "previous", None, ima.icon("previous"), _("Back"), triggered=self.previous_directory
        )
        self.addAction(self.previous_action)

        # Next dir action
        self.history = []
        self.histindex = None
        self.next_action = create_action(self, "next", None, ima.icon("next"), _("Next"), triggered=self.next_directory)
        self.addAction(self.next_action)

        # Enable/disable previous/next actions
        self.set_previous_enabled.connect(self.previous_action.setEnabled)
        self.set_next_enabled.connect(self.next_action.setEnabled)

        # Path combo box
        adjust = self.get_option("working_dir_adjusttocontents")
        self.pathedit = PathComboBox(self, adjust_to_contents=adjust)
        self.pathedit.setToolTip(
            _(
                "This is the working directory for newly\n"
                "opened consoles (Python/IPython consoles and\n"
                "terminals), for the file explorer, for the\n"
                "find in files plugin and for new files\n"
                "created in the editor"
            )
        )
        self.pathedit.open_dir.connect(self.chdir)
        self.pathedit.activated[str].connect(self.chdir)
        self.pathedit.setMaxCount(self.get_option("working_dir_history"))
        wdhistory = self.load_wdhistory(workdir)
        if workdir is None:
            if self.get_option("startup/use_last_directory"):
                if wdhistory:
                    workdir = wdhistory[0]
                else:
                    workdir = "."
            else:
                workdir = self.get_option("startup/fixed_directory", ".")
                if not osp.isdir(workdir):
                    workdir = "."
        self.chdir(workdir)
        self.pathedit.addItems(wdhistory)
        self.pathedit.selected_text = self.pathedit.currentText()
        self.refresh_plugin()
        self.addWidget(self.pathedit)

        # Browse action
        browse_action = create_action(
            self,
            "browse",
            None,
            ima.icon("DirOpenIcon"),
            _("Browse a working directory"),
            triggered=self.select_directory,
        )
        self.addAction(browse_action)

        # Parent dir action
        parent_action = create_action(
            self, "parent", None, ima.icon("up"), _("Change to parent directory"), triggered=self.parent_directory
        )
        self.addAction(parent_action)
Beispiel #49
0
    def __init__(self, parent=None):
        UnitTestingWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()
Beispiel #50
0
    def __init__(self, parent=None):
        LineProfilerWidget.__init__(self, parent=parent)
        SpyderPluginMixin.__init__(self, parent)

        # Initialize plugin
        self.initialize_plugin()