def __init__(self, modname, features, required_version, installed_version=None): self.modname = modname self.features = features self.required_version = required_version if installed_version is None: try: self.installed_version = programs.get_module_version(modname) except ImportError: # Module is not installed self.installed_version = None else: self.installed_version = installed_version
from SMlib.widgets.sourcecode import codeeditor from SMlib.widgets.findreplace import FindReplace from SMlib.widgets.browser import WebView from SMlib.widgets.externalshell.pythonshell import ExtPythonShellWidget from SMlib.plugins import SMPluginWidget, PluginConfigPage #XXX: Hardcoded dependency on optional IPython plugin component # that requires the hack to make this work without IPython if programs.is_module_installed(IPYTHON_QT_MODULE, SUPPORTED_IPYTHON): from SMlib.widgets.ipython import IPythonControlWidget else: IPythonControlWidget = None # analysis:ignore # Check for Sphinx presence to activate rich text mode if programs.is_module_installed('sphinx', '>=0.6.6'): sphinx_version = programs.get_module_version('sphinx') from SMlib.utils.inspector.sphinxify import (CSS_PATH, sphinxify, warning, generate_context) else: sphinxify = sphinx_version = None # analysis:ignore # To add sphinx dependency to the Dependencies dialog SPHINX_REQVER = '>=0.6.6' dependencies.add("sphinx", _("Rich text help on the Object Inspector"), required_version=SPHINX_REQVER) class ObjectComboBox(EditableComboBox): """ QComboBox handling object names """
from SMlib.widgets.sourcecode import codeeditor from SMlib.widgets.findreplace import FindReplace from SMlib.widgets.browser import WebView from SMlib.widgets.externalshell.pythonshell import ExtPythonShellWidget from SMlib.plugins import SMPluginWidget, PluginConfigPage # XXX: Hardcoded dependency on optional IPython plugin component # that requires the hack to make this work without IPython if programs.is_module_installed(IPYTHON_QT_MODULE, SUPPORTED_IPYTHON): from SMlib.widgets.ipython import IPythonControlWidget else: IPythonControlWidget = None # analysis:ignore # Check for Sphinx presence to activate rich text mode if programs.is_module_installed("sphinx", ">=0.6.6"): sphinx_version = programs.get_module_version("sphinx") from SMlib.utils.inspector.sphinxify import CSS_PATH, sphinxify, warning, generate_context else: sphinxify = sphinx_version = None # analysis:ignore # To add sphinx dependency to the Dependencies dialog SPHINX_REQVER = ">=0.6.6" dependencies.add("sphinx", _("Rich text help on the Object Inspector"), required_version=SPHINX_REQVER) class ObjectComboBox(EditableComboBox): """ QComboBox handling object names """ def __init__(self, parent):