eric6/MicroPython/MicrobitDevices.py

changeset 7186
ccd55666e9d2
parent 7173
f611c3b7313f
child 7229
53054eb5b15a
equal deleted inserted replaced
7185:af8e89a7a51d 7186:ccd55666e9d2
230 """ 230 """
231 aw = e5App().getObject("ViewManager").activeWindow() 231 aw = e5App().getObject("ViewManager").activeWindow()
232 if not aw: 232 if not aw:
233 return 233 return
234 234
235 if not (aw.isPy3File() or aw.isPy2File()): 235 if not (aw.isPyFile() or aw.isMicroPythonFile()):
236 yes = E5MessageBox.yesNo( 236 yes = E5MessageBox.yesNo(
237 self.microPython, 237 self.microPython,
238 self.tr("Flash Script"), 238 self.tr("Flash Script"),
239 self.tr("""The current editor does not contain a Python""" 239 self.tr("""The current editor does not contain a Python"""
240 """ script. Flash it anyway?""")) 240 """ script. Flash it anyway?"""))
270 """ 270 """
271 aw = e5App().getObject("ViewManager").activeWindow() 271 aw = e5App().getObject("ViewManager").activeWindow()
272 if not aw: 272 if not aw:
273 return 273 return
274 274
275 if not (aw.isPy3File() or aw.isPy2File()): 275 if not (aw.isPyFile() or aw.isMicroPythonFile()):
276 yes = E5MessageBox.yesNo( 276 yes = E5MessageBox.yesNo(
277 self.microPython, 277 self.microPython,
278 self.tr("Save Script as 'main.py'"), 278 self.tr("Save Script as 'main.py'"),
279 self.tr("""The current editor does not contain a Python""" 279 self.tr("""The current editor does not contain a Python"""
280 """ script. Write it anyway?""")) 280 """ script. Write it anyway?"""))

eric ide

mercurial