src/eric7/MicroPython/MicroPythonWidget.py

branch
eric7
changeset 10512
b7292f2691f9
parent 10482
72d9b5ea39b4
child 10518
1682f3203ae5
equal deleted inserted replaced
10511:eae654129780 10512:b7292f2691f9
1475 def __compileEditor2Mpy(self): 1475 def __compileEditor2Mpy(self):
1476 """ 1476 """
1477 Private slot to cross compile the current editor to a .mpy file. 1477 Private slot to cross compile the current editor to a .mpy file.
1478 """ 1478 """
1479 aw = ericApp().getObject("ViewManager").activeWindow() 1479 aw = ericApp().getObject("ViewManager").activeWindow()
1480 if not aw.checkDirty(): 1480 if aw:
1481 # editor still has unsaved changes, abort... 1481 if not aw.checkDirty():
1482 return 1482 # editor still has unsaved changes, abort...
1483 if not aw.isPyFile(): 1483 return
1484 # no Python file 1484
1485 EricMessageBox.critical( 1485 if not aw.isPyFile():
1486 self, 1486 # no Python file
1487 self.tr("Compile Current Editor"), 1487 EricMessageBox.critical(
1488 self.tr( 1488 self,
1489 """The current editor does not contain a Python""" 1489 self.tr("Compile Current Editor"),
1490 """ file. Aborting...""" 1490 self.tr(
1491 ), 1491 """The current editor does not contain a Python"""
1492 ) 1492 """ file. Aborting..."""
1493 return 1493 ),
1494 1494 )
1495 self.__crossCompile( 1495 return
1496 pythonFile=aw.getFileName(), title=self.tr("Compile Current Editor") 1496
1497 ) 1497 self.__crossCompile(
1498 pythonFile=aw.getFileName(), title=self.tr("Compile Current Editor")
1499 )
1498 1500
1499 @pyqtSlot() 1501 @pyqtSlot()
1500 def __showDocumentation(self): 1502 def __showDocumentation(self):
1501 """ 1503 """
1502 Private slot to open the documentation URL for the selected device. 1504 Private slot to open the documentation URL for the selected device.

eric ide

mercurial