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()
def initialize(self): GeneralConfigPage.initialize(self)
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)