eric7/VirtualEnv/VirtualenvAddEditDialog.py

branch
eric7
changeset 9016
6f079c524e99
parent 9001
a00cd6b55728
--- a/eric7/VirtualEnv/VirtualenvAddEditDialog.py	Sun Apr 03 17:23:31 2022 +0200
+++ b/eric7/VirtualEnv/VirtualenvAddEditDialog.py	Mon Apr 04 17:43:43 2022 +0200
@@ -8,7 +8,6 @@
 """
 
 import os
-import sys
 
 from PyQt6.QtCore import pyqtSlot, Qt
 from PyQt6.QtWidgets import QDialog, QDialogButtonBox
@@ -17,6 +16,7 @@
 
 from .Ui_VirtualenvAddEditDialog import Ui_VirtualenvAddEditDialog
 
+import Globals
 import Utilities
 
 
@@ -77,7 +77,7 @@
         self.pythonExecPicker.setWindowTitle(
             self.tr("Python Interpreter"))
         self.pythonExecPicker.setDefaultDirectory(
-            sys.executable.replace("w.exe", ".exe"))
+            Globals.getPythonExecutable())
         
         self.execPathEdit.setToolTip(self.tr(
             "Enter the executable search path to be prepended to the PATH"
@@ -192,7 +192,7 @@
             self.pythonExecPicker.setDefaultDirectory(txt)
         else:
             self.pythonExecPicker.setDefaultDirectory(
-                sys.executable.replace("w.exe", ".exe"))
+                Globals.getPythonExecutable())
         py = self.__detectPythonInterpreter(txt)
         if py:
             self.pythonExecPicker.setText(py)

eric ide

mercurial