Exemplo n.º 1
0
    def __init__(self, parent, main):
        GeneralConfigPage.__init__(self, parent, main)
        self.cus_exec_radio = None
        self.pyexec_edit = None
        self.cus_exec_combo = None

        # Python executable selection (initializing default values as well)
        executable = self.get_option('executable', get_python_executable())
        if self.get_option('default'):
            executable = get_python_executable()

        if not osp.isfile(executable):
            # This is absolutely necessary, in case the Python interpreter
            # executable has been moved since last Spyder execution (following
            # a Python distribution upgrade for example)
            self.set_option('executable', get_python_executable())
        elif executable.endswith('pythonw.exe'):
            # That should not be necessary because this case is already taken
            # care of by the `get_python_executable` function but, this was
            # implemented too late, so we have to fix it here too, in case
            # the Python executable has already been set with pythonw.exe:
            self.set_option('executable',
                            executable.replace("pythonw.exe", "python.exe"))

        if not self.get_option('default'):
            if not self.get_option('custom_interpreter'):
                self.set_option('custom_interpreter', ' ')
            self.set_custom_interpreters_list(executable)
            self.validate_custom_interpreters_list()
Exemplo n.º 2
0
    def __init__(self, parent, main):
        GeneralConfigPage.__init__(self, parent, main)
        self.cus_exec_radio = None
        self.pyexec_edit = None

        # Python executable selection (initializing default values as well)
        executable = self.get_option('executable', get_python_executable())
        if self.get_option('default'):
            executable = get_python_executable()

        if not osp.isfile(executable):
            # This is absolutely necessary, in case the Python interpreter
            # executable has been moved since last Spyder execution (following
            # a Python distribution upgrade for example)
            self.set_option('executable', get_python_executable())
        elif executable.endswith('pythonw.exe'):
            # That should not be necessary because this case is already taken
            # care of by the `get_python_executable` function but, this was
            # implemented too late, so we have to fix it here too, in case
            # the Python executable has already been set with pythonw.exe:
            self.set_option('executable',
                            executable.replace("pythonw.exe", "python.exe"))
Exemplo n.º 3
0
 def initialize(self):
     GeneralConfigPage.initialize(self)
     self.pyexec_edit.textChanged.connect(self.python_executable_changed)
     self.cus_exec_radio.toggled.connect(self.python_executable_switched)
Exemplo n.º 4
0
 def initialize(self):
     GeneralConfigPage.initialize(self)
     self.pyexec_edit.textChanged.connect(self.python_executable_changed)
     self.cus_exec_radio.toggled.connect(self.python_executable_switched)
Exemplo n.º 5
0
 def initialize(self):
     GeneralConfigPage.initialize(self)
Exemplo n.º 6
0
    def __init__(self, parent, main, project):
        self._project = project
        self._conf_files = project.get_conf_files()
        self._conf = self._conf_files[self.CONF_SECTION]

        GeneralConfigPage.__init__(self, parent, main)
Exemplo n.º 7
0
    def __init__(self, parent, main, project):
        self._project = project
        self._conf_files = project.get_conf_files()
        self._conf = self._conf_files[self.CONF_SECTION]

        GeneralConfigPage.__init__(self, parent, main)