1428 act = self.__superMenu.addAction( |
1428 act = self.__superMenu.addAction( |
1429 self.tr("Show Time"), self.__showLocalAndDeviceTime |
1429 self.tr("Show Time"), self.__showLocalAndDeviceTime |
1430 ) |
1430 ) |
1431 act.setEnabled(self.__connected) |
1431 act.setEnabled(self.__connected) |
1432 self.__superMenu.addSeparator() |
1432 self.__superMenu.addSeparator() |
|
1433 self.__superMenu.addAction( |
|
1434 self.tr("Show Builtin Modules"), self.__showBuiltinModules |
|
1435 ).setEnabled(self.__connected) |
|
1436 self.__superMenu.addSeparator() |
1433 if not OSUtilities.isWindowsPlatform(): |
1437 if not OSUtilities.isWindowsPlatform(): |
1434 available = self.__mpyCrossAvailable() |
1438 available = self.__mpyCrossAvailable() |
1435 act = self.__superMenu.addAction( |
1439 act = self.__superMenu.addAction( |
1436 self.tr("Compile Python File"), self.__compileFile2Mpy |
1440 self.tr("Compile Python File"), self.__compileFile2Mpy |
1437 ) |
1441 ) |
1922 Private slot to flash MicroPython/CircuitPython to a device |
1926 Private slot to flash MicroPython/CircuitPython to a device |
1923 support the UF2 bootloader. |
1927 support the UF2 bootloader. |
1924 """ |
1928 """ |
1925 dlg = UF2FlashDialog.UF2FlashDialog() |
1929 dlg = UF2FlashDialog.UF2FlashDialog() |
1926 dlg.exec() |
1930 dlg.exec() |
|
1931 |
|
1932 @pyqtSlot() |
|
1933 def __showBuiltinModules(self): |
|
1934 """ |
|
1935 Private slot to show a list of builtin modules. |
|
1936 """ |
|
1937 from .ShowModulesDialog import ShowModulesDialog |
|
1938 |
|
1939 if self.__connected: |
|
1940 moduleNames = self.__interface.getModules() |
|
1941 dlg = ShowModulesDialog( |
|
1942 moduleNames, |
|
1943 info=self.tr("Plus any modules on the filesystem."), |
|
1944 parent=self, |
|
1945 ) |
|
1946 dlg.show() |