diff -r 9c1f429cb56b -r b47dfa7a137d src/eric7/MicroPython/EspDevices.py --- a/src/eric7/MicroPython/EspDevices.py Sun Dec 18 14:19:10 2022 +0100 +++ b/src/eric7/MicroPython/EspDevices.py Sun Dec 18 19:33:46 2022 +0100 @@ -11,10 +11,11 @@ from PyQt6.QtCore import QProcess, pyqtSlot from PyQt6.QtWidgets import QDialog -from eric7 import Globals, Preferences +from eric7 import Preferences from eric7.EricWidgets import EricMessageBox from eric7.EricWidgets.EricApplication import ericApp from eric7.EricWidgets.EricProcessDialog import EricProcessDialog +from eric7.SystemUtilities import PythonUtilities from .MicroPythonDevices import MicroPythonDevice from .MicroPythonWidget import HAS_QTCHART @@ -184,7 +185,7 @@ self.tr("Erase Flash"), showProgress=True, ) - res = dlg.startProcess(Globals.getPythonExecutable(), flashArgs) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: dlg.exec() @@ -221,7 +222,7 @@ self.tr("Flash MicroPython Firmware"), showProgress=True, ) - res = dlg.startProcess(Globals.getPythonExecutable(), flashArgs) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: dlg.exec() @@ -258,7 +259,7 @@ self.tr("Flash Additional Firmware"), showProgress=True, ) - res = dlg.startProcess(Globals.getPythonExecutable(), flashArgs) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: dlg.exec() @@ -292,7 +293,7 @@ self.tr("Backup Firmware"), showProgress=True, ) - res = dlg.startProcess(Globals.getPythonExecutable(), flashArgs) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: dlg.exec() @@ -343,7 +344,7 @@ self.tr("Restore Firmware"), showProgress=True, ) - res = dlg.startProcess(Globals.getPythonExecutable(), flashArgs) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), flashArgs) if res: dlg.exec() @@ -363,7 +364,7 @@ dlg = EricProcessDialog( self.tr("'esptool chip_id' Output"), self.tr("Show Chip ID") ) - res = dlg.startProcess(Globals.getPythonExecutable(), args) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: dlg.exec() @@ -383,7 +384,7 @@ dlg = EricProcessDialog( self.tr("'esptool flash_id' Output"), self.tr("Show Flash ID") ) - res = dlg.startProcess(Globals.getPythonExecutable(), args) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: dlg.exec() @@ -403,7 +404,7 @@ dlg = EricProcessDialog( self.tr("'esptool read_mac' Output"), self.tr("Show MAC Address") ) - res = dlg.startProcess(Globals.getPythonExecutable(), args) + res = dlg.startProcess(PythonUtilities.getPythonExecutable(), args) if res: dlg.exec() @@ -431,7 +432,7 @@ "flash_id", ] proc = QProcess() - proc.start(Globals.getPythonExecutable(), args) + proc.start(PythonUtilities.getPythonExecutable(), args) procStarted = proc.waitForStarted(10000) if procStarted: proc.waitForFinished(10000) @@ -442,7 +443,9 @@ Private slot to install the esptool package via pip. """ pip = ericApp().getObject("Pip") - pip.installPackages(["esptool"], interpreter=Globals.getPythonExecutable()) + pip.installPackages( + ["esptool"], interpreter=PythonUtilities.getPythonExecutable() + ) def getDocumentationUrl(self): """