diff -r 2028553ee58c -r 376deb7fefe7 eric6/MicroPython/MicrobitDevices.py --- a/eric6/MicroPython/MicrobitDevices.py Wed Aug 07 16:08:46 2019 +0200 +++ b/eric6/MicroPython/MicrobitDevices.py Wed Aug 07 16:10:12 2019 +0200 @@ -45,7 +45,7 @@ """ super(MicrobitDevice, self).setButtons() self.microPython.setActionButtons( - repl=True, chart=HAS_QTCHART) + run=True, repl=True, files=True, chart=HAS_QTCHART) def forceInterrupt(self): """ @@ -57,6 +57,15 @@ """ return True + def deviceName(self): + """ + Public method to get the name of the device. + + @return name of the device + @rtype str + """ + return self.tr("BBC micro:bit") + def canStartRepl(self): """ Public method to determine, if a REPL can be started. @@ -77,6 +86,26 @@ """ return True, "" + def canRunScript(self): + """ + Public method to determine, if a script can be executed. + + @return tuple containing a flag indicating it is safe to start a + Plotter and a reason why it cannot. + @rtype tuple of (bool, str) + """ + return True, "" + + def runScript(self, script): + """ + Public method to run the given Python script. + + @param script script to be executed + @type str + """ + pythonScript = script.split("\n") + self.sendCommands(pythonScript) + def canStartFileManager(self): """ Public method to determine, if a File Manager can be started. @@ -85,7 +114,7 @@ File Manager and a reason why it cannot. @rtype tuple of (bool, str) """ - return False, "" + return True, "" def getWorkspace(self): """