コード例 #1
0
ファイル: maininterpreter.py プロジェクト: zerocewl/spyder
    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()
コード例 #2
0
ファイル: maininterpreter.py プロジェクト: impact27/spyder
    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()
コード例 #3
0
ファイル: maininterpreter.py プロジェクト: zerocewl/spyder
 def initialize(self):
     GeneralConfigPage.initialize(self)
コード例 #4
0
ファイル: maininterpreter.py プロジェクト: impact27/spyder
 def initialize(self):
     GeneralConfigPage.initialize(self)
コード例 #5
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)
コード例 #6
0
ファイル: confpage.py プロジェクト: burrbull/spyder
    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)