eric6/MicroPython/MicrobitDevices.py

changeset 8143
2c730d5fd177
parent 8117
aaa5e0eacd4e
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
266 '</p>' 266 '</p>'
267 ) 267 )
268 ) 268 )
269 elif len(deviceDirectories) == 1: 269 elif len(deviceDirectories) == 1:
270 downloadsPath = QStandardPaths.standardLocations( 270 downloadsPath = QStandardPaths.standardLocations(
271 QStandardPaths.DownloadLocation)[0] 271 QStandardPaths.StandardLocation.DownloadLocation)[0]
272 firmware = E5FileDialog.getOpenFileName( 272 firmware = E5FileDialog.getOpenFileName(
273 self.microPython, 273 self.microPython,
274 self.tr("Flash MicroPython/Firmware"), 274 self.tr("Flash MicroPython/Firmware"),
275 downloadsPath, 275 downloadsPath,
276 self.tr("MicroPython/Firmware Files (*.hex *.bin);;" 276 self.tr("MicroPython/Firmware Files (*.hex *.bin);;"
332 scriptName = os.path.basename(aw.getFileName()) 332 scriptName = os.path.basename(aw.getFileName())
333 scriptName, ok = QInputDialog.getText( 333 scriptName, ok = QInputDialog.getText(
334 self.microPython, 334 self.microPython,
335 title, 335 title,
336 self.tr("Enter a file name on the device:"), 336 self.tr("Enter a file name on the device:"),
337 QLineEdit.Normal, 337 QLineEdit.EchoMode.Normal,
338 scriptName) 338 scriptName)
339 if not ok or not bool(scriptName): 339 if not ok or not bool(scriptName):
340 return 340 return
341 341
342 title = self.tr("Save Script as '{0}'").format(scriptName) 342 title = self.tr("Save Script as '{0}'").format(scriptName)

eric ide

mercurial