--- a/eric7/Globals/__init__.py Sun Apr 03 17:23:31 2022 +0200 +++ b/eric7/Globals/__init__.py Mon Apr 04 17:43:43 2022 +0200 @@ -244,6 +244,21 @@ configDir = os.path.expanduser(d) +def getPythonExecutable(): + """ + Function to determine the path of the (non-windowed) Python executable. + + @return path of the Python executable + @rtype str + """ + if sys.platform.startswith("linux"): + return sys.executable + elif sys.platform == "darwin": + return sys.executable.replace("pythonw", "python") + else: + return sys.executable.replace("pythonw.exe", "python.exe") + + def getPythonLibraryDirectory(): """ Function to determine the path to Python's library directory. @@ -554,7 +569,7 @@ scriptPath = os.path.join(getConfig("ericDir"), "Tools", "webBrowserSupport.py") proc = QProcess() - proc.start(sys.executable, [scriptPath, qVersion()]) + proc.start(getPythonExecutable(), [scriptPath, qVersion()]) variant = ( str(proc.readAllStandardOutput(), "utf-8", 'replace').strip() if proc.waitForFinished(10000) else