# (see spyderlib/__init__.py for details) """Pylint Code Analysis Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui import QInputDialog, QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import Signal, Qt import spyderlib.utils.icon_manager as ima # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_pylint", dirname="spyderplugins") from spyderlib.utils.qthelpers import create_action from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.pylintgui import PylintWidget, PYLINT_PATH class PylintConfigPage(PluginConfigPage): def setup_page(self): settings_group = QGroupBox(_("Settings")) save_box = self.create_checkbox(_("Save file before analyzing it"), 'save_before', default=True) hist_group = QGroupBox(_("History")) hist_label1 = QLabel(_("The following option will be applied at next " "startup."))
import tellurium as te import string import tempfile, shutil, errno from xml.etree import ElementTree from spyderlib.baseconfig import get_translation from spyderlib.config import CONF from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderlib.py3compat import getcwd, to_text_string, is_text_string from spyderlib.qt.QtCore import SIGNAL from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QWidget, QApplication, QMessageBox from spyderlib.qt.compat import getopenfilenames from spyderlib.utils import encoding, sourcecode from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.widgets.sourcecode.codeeditor import CodeEditor _ = get_translation("p_import_combine_phrasedml", dirname="spyderplugins") #Temp. disabled (Not needed) #class C2PConfigPage(PluginConfigPage): # def setup_page(self): # settings_group = QGroupBox(_("Settings")) # save_box = self.create_checkbox(_("Placeholder in case we at some point need a settings page."), # 'tick_value', default=True) # # settings_layout = QVBoxLayout() # settings_layout.addWidget(save_box) # settings_group.setLayout(settings_layout) # # vlayout = QVBoxLayout() # vlayout.addWidget(settings_group) # vlayout.addStretch(1)
# Copyright © 2012 Jed Ludlow # Based loosely on p_pylint.py by Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Breakpoint Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_breakpoints", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.plugins import SpyderPluginMixin from spyderplugins.widgets.breakpointsgui import BreakpointWidget from spyderlib.py3compat import to_text_string, is_text_string class Breakpoints(BreakpointWidget, SpyderPluginMixin): """Breakpoint list""" CONF_SECTION = 'breakpoints' # CONFIGWIDGET_CLASS = BreakpointConfigPage def __init__(self, parent=None): BreakpointWidget.__init__(self, parent=parent) SpyderPluginMixin.__init__(self, parent)
""" Rate Law Plugin - Basic implementation of Rate Law Library plugin - Shows example of how to add Hello World to the External Tools menu, e.g. Tools -> External Tools RateLaw item to theConfiguration Page, e.g. Tools -> Preferences """ from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_helloworld", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.ratelawgui import RateLawWidget class RateLawConfigPage(PluginConfigPage): """ The Configuration Page that can be found under Tools -> Preferences. This only displays a label. """ def setup_page(self): """ Setup of the configuration page. All widgets need to be added here""" setup_group = QGroupBox(_("RateLaw Plugin Configuration"))
from __future__ import print_function, division import os, time import re import tellurium as te from spyderlib.baseconfig import get_translation from spyderlib.config import CONF from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderlib.py3compat import getcwd from spyderlib.qt.QtCore import SIGNAL from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QWidget, QApplication, QMessageBox, QMenu from spyderlib.qt.compat import getopenfilenames from spyderlib.utils import encoding, sourcecode from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.widgets.sourcecode.codeeditor import CodeEditor _ = get_translation("p_opensbml", dirname="spyderplugins") class openSBML(QWidget, SpyderPluginMixin): "Open sbml files and translate into antimony string" CONF_SECTION = 'openSBML' def __init__(self, parent=None): QWidget.__init__(self, parent=parent) SpyderPluginMixin.__init__(self, parent) layout = QVBoxLayout() self.setLayout(layout) # Initialize plugin self.initialize_plugin() #------ SpyderPluginWidget API -------------------------------------------- def get_plugin_title(self):
# Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Coverage Code Analysis Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui import QInputDialog, QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import SIGNAL, Qt # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_coverage", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.coveragegui import CoverageWidget, COVERAGE_PATH class CoverageConfigPage(PluginConfigPage): def setup_page(self): """ Create the Spyder Config page for this plugin. As of Dec 2014, there are no options available to set, so we only display the data path. """ results_group = QGroupBox(_("Results"))
import sys import os import os.path as osp import time # Local imports from spyderlib.utils.qthelpers import (create_toolbutton, get_item_user_text, set_item_user_text, get_icon) from spyderlib.utils.programs import shell_split from spyderlib.baseconfig import get_conf_path, get_translation from spyderlib.widgets.texteditor import TextEditor from spyderlib.widgets.comboboxes import PythonModulesComboBox from spyderlib.widgets.externalshell import baseshell from spyderlib.py3compat import to_text_string, getcwd _ = get_translation("p_profiler", dirname="spyderplugins") def is_profiler_installed(): from spyderlib.utils.programs import is_module_installed return is_module_installed('cProfile') and is_module_installed('pstats') class ProfilerWidget(QWidget): """ Profiler widget """ DATAPATH = get_conf_path('profiler.results') VERSION = '0.0.1' def __init__(self, parent, max_entries=100):
# -*- coding:utf-8 -*- # # Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) from spyderlib.qt.QtCore import Signal # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("spectracer", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon from spyderlib.plugins import SpyderPluginMixin from spyderplugins.widgets.spectracergui import SpectracerWidget from speclib.core import ChartManager class Spectracer(SpectracerWidget, SpyderPluginMixin): """Python source code analysis based on pylint""" CONF_SECTION = 'spectracer' edit_goto = Signal(str, int, str) 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)
from __future__ import print_function, division import os, time import re import tellurium as te from spyderlib.baseconfig import get_translation from spyderlib.config import CONF from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderlib.py3compat import getcwd, to_text_string, is_text_string from spyderlib.qt.QtCore import SIGNAL from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QWidget, QApplication, QMessageBox, QMenu from spyderlib.qt.compat import getopenfilenames from spyderlib.utils import encoding, sourcecode from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.widgets.sourcecode.codeeditor import CodeEditor _ = get_translation("p_import_sedml", dirname="spyderplugins") #Temp. disabled (Not needed) #class S2PConfigPage(PluginConfigPage): # def setup_page(self): # settings_group = QGroupBox(_("Settings")) # save_box = self.create_checkbox(_("Placeholder in case we at some point need a settings page."), # 'tick_value', default=True) # # settings_layout = QVBoxLayout() # settings_layout.addWidget(save_box) # settings_group.setLayout(settings_layout) # # vlayout = QVBoxLayout() # vlayout.addWidget(settings_group) # vlayout.addStretch(1)
"""Import SED-ML to Python Plugin""" import os, time import re import spyderplugins.widgets.SedmlToRr as se from spyderlib.baseconfig import get_translation from spyderlib.config import CONF from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderlib.py3compat import getcwd, to_text_string, is_text_string from spyderlib.qt.QtCore import SIGNAL from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QWidget, QApplication, QMessageBox, QMenu from spyderlib.qt.compat import getopenfilenames from spyderlib.utils import encoding, sourcecode from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.widgets.sourcecode.codeeditor import CodeEditor _ = get_translation("p_import_sedml", dirname="spyderplugins") #Temp. disabled (Not needed) #class S2PConfigPage(PluginConfigPage): # def setup_page(self): # settings_group = QGroupBox(_("Settings")) # save_box = self.create_checkbox(_("Placeholder in case we at some point need a settings page."), # 'tick_value', default=True) # # settings_layout = QVBoxLayout() # settings_layout.addWidget(save_box) # settings_group.setLayout(settings_layout) # # vlayout = QVBoxLayout() # vlayout.addWidget(settings_group) # vlayout.addStretch(1)
# Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Pylint Code Analysis Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui import QInputDialog, QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import Signal, Qt # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_pylint", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.pylintgui import PylintWidget, PYLINT_PATH class PylintConfigPage(PluginConfigPage): def setup_page(self): settings_group = QGroupBox(_("Settings")) save_box = self.create_checkbox(_("Save file before analyzing it"), 'save_before', default=True) hist_group = QGroupBox(_("History")) hist_label1 = QLabel(
FIX_LIST = [(code.strip(), description.strip()) for code, description in autopep8.supported_fixes()] DEFAULT_IGNORE = ["E711", "E712", "W6"] except AttributeError: ERR_MSG = "Please install autopep8 >= 0.8.6, and pep8 >= 1.4.2." except ImportError: ERR_MSG = "Please install autopep8 >= 0.8.6, and pep8 >= 1.4.2." from spyderlib.qt.QtGui import (QWidget, QTextCursor, QVBoxLayout, QGroupBox, QScrollArea, QLabel, QCheckBox) from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_autopep8", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.py3compat import to_text_string from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage class AutoPEP8ConfigPage(PluginConfigPage): """Widget with configuration options for line profiler """ GROUPS = { "1": "Indentation", "2": "Whitespace", "3": "Blank line", "4": "Import", "5": "Line length",
# Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Conda Package Manager Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtCore import Qt from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QGridLayout # Local imports from spyderlib.baseconfig import get_translation, DEV _ = get_translation("p_condapackages", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.condapackagesgui import (CondaPackagesWidget, CONDA_PATH) class CondaPackagesConfigPage(PluginConfigPage): """ """ def setup_page(self): network_group = QGroupBox(_("Network settings")) self.checkbox_proxy = self.create_checkbox(_("Use network proxy"), 'use_proxy_flag', default=False) server = self.create_lineedit(_('Server'),
""" Rate Law Plugin - Basic implementation of Rate Law Library plugin - Shows example of how to add Hello World to the External Tools menu, e.g. Tools -> External Tools RateLaw item to theConfiguration Page, e.g. Tools -> Preferences """ from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_helloworld", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderplugins.widgets.ratelawgui import RateLawWidget class RateLawConfigPage(PluginConfigPage): """ The Configuration Page that can be found under Tools -> Preferences. This only displays a label. """ def setup_page(self): """ Setup of the configuration page. All widgets need to be added here"""
# -*- coding:utf-8 -*- # # Copyright © 2011 Santiago Jaramillo # based on p_pylint.py by Pierre Raybaut # # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Profiler Plugin""" from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import Signal, Qt # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_profiler", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage, runconfig from spyderplugins.widgets.profilergui import (ProfilerWidget, is_profiler_installed) class ProfilerConfigPage(PluginConfigPage): def setup_page(self): results_group = QGroupBox(_("Results")) results_label1 = QLabel(_("Profiler plugin results "\ "(the output of python's profile/cProfile)\n" "are stored here:")) results_label1.setWordWrap(True) # Warning: do not try to regroup the following QLabel contents with
# Based loosely on p_pylint.py by Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Breakpoint Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_breakpoints", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.plugins import SpyderPluginMixin from spyderplugins.widgets.breakpointsgui import BreakpointWidget from spyderlib.py3compat import to_text_string, is_text_string class Breakpoints(BreakpointWidget, SpyderPluginMixin): """Breakpoint list""" CONF_SECTION = 'breakpoints' # CONFIGWIDGET_CLASS = BreakpointConfigPage def __init__(self, parent=None): BreakpointWidget.__init__(self, parent=parent) SpyderPluginMixin.__init__(self, parent) # Initialize plugin
import tellurium as te import string import tempfile, shutil, errno from xml.etree import ElementTree from spyderlib.baseconfig import get_translation from spyderlib.config import CONF from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage from spyderlib.py3compat import getcwd, to_text_string, is_text_string from spyderlib.qt.QtCore import SIGNAL from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QWidget, QApplication, QMessageBox, QMenu from spyderlib.qt.compat import getopenfilenames from spyderlib.utils import encoding, sourcecode from spyderlib.utils.qthelpers import get_icon, create_action, add_actions from spyderlib.widgets.sourcecode.codeeditor import CodeEditor _ = get_translation("p_import_combine", dirname="spyderplugins") #Temp. disabled (Not needed) #class C2PConfigPage(PluginConfigPage): # def setup_page(self): # settings_group = QGroupBox(_("Settings")) # save_box = self.create_checkbox(_("Placeholder in case we at some point need a settings page."), # 'tick_value', default=True) # # settings_layout = QVBoxLayout() # settings_layout.addWidget(save_box) # settings_group.setLayout(settings_layout) # # vlayout = QVBoxLayout() # vlayout.addWidget(settings_group) # vlayout.addStretch(1)
for code, description in autopep8.supported_fixes()] DEFAULT_IGNORE = ["E711", "E712", "W6"] except AttributeError: ERR_MSG = "Please install autopep8 >= 0.8.6, and pep8 >= 1.4.2." except ImportError: ERR_MSG = "Please install autopep8 >= 0.8.6, and pep8 >= 1.4.2." from spyderlib.qt.QtGui import ( QWidget, QTextCursor, QVBoxLayout, QGroupBox, QScrollArea, QLabel, QCheckBox) from spyderlib.qt.QtCore import SIGNAL # Local imports from spyderlib.baseconfig import get_translation _ = get_translation("p_autopep8", dirname="spyderplugins") from spyderlib.utils.qthelpers import get_icon, create_action from spyderlib.py3compat import to_text_string from spyderlib.plugins import SpyderPluginMixin, PluginConfigPage class AutoPEP8ConfigPage(PluginConfigPage): """Widget with configuration options for line profiler """ GROUPS = { "1": "Indentation", "2": "Whitespace", "3": "Blank line", "4": "Import",