src/eric7/MicroPython/CircuitPythonDevices.py

branch
eric7
changeset 9745
2c706ccc2b42
parent 9742
48dbfea4ac06
child 9746
37d460e32843
equal deleted inserted replaced
9744:92fbd6bdba84 9745:2c706ccc2b42
362 if os.path.exists(bootFile): 362 if os.path.exists(bootFile):
363 with open(bootFile, "r") as f: 363 with open(bootFile, "r") as f:
364 line = f.readline() 364 line = f.readline()
365 cpyVersionStr = line.split(";")[0].split()[2] 365 cpyVersionStr = line.split(";")[0].split()[2]
366 cpyVersion = Globals.versionToTuple(cpyVersionStr) 366 cpyVersion = Globals.versionToTuple(cpyVersionStr)
367 if cpyVersion == (0, 0, 0) and self.microPython.isConnected():
368 # drive is not mounted or 'boot_out.txt' is missing but the device
369 # is connected via the serial console
370 interface = self.microPython.commandsInterface()
371 if interface is not None:
372 impInfo = interface.getImplementation()
373 if impInfo["version"] != "unknown":
374 cpyVersionStr = impInfo["version"]
375 cpyVersion = Globals.versionToTuple(cpyVersionStr)
367 376
368 msg = self.tr( 377 msg = self.tr(
369 "<h4>CircuitPython Version Information</h4>" 378 "<h4>CircuitPython Version Information</h4>"
370 "<table>" 379 "<table>"
371 "<tr><td>Installed:</td><td>{0}</td></tr>" 380 "<tr><td>Installed:</td><td>{0}</td></tr>"

eric ide

mercurial