Fri, 30 Aug 2019 19:07:18 +0200
Utilities, MicrobitDevices: added MicroPython to the known Python Variants.
eric6/MicroPython/MicrobitDevices.py | file | annotate | diff | comparison | revisions | |
eric6/Utilities/__init__.py | file | annotate | diff | comparison | revisions |
--- a/eric6/MicroPython/MicrobitDevices.py Fri Aug 30 19:00:38 2019 +0200 +++ b/eric6/MicroPython/MicrobitDevices.py Fri Aug 30 19:07:18 2019 +0200 @@ -232,7 +232,7 @@ if not aw: return - if not (aw.isPy3File() or aw.isPy2File()): + if not (aw.isPyFile() or aw.isMicroPythonFile()): yes = E5MessageBox.yesNo( self.microPython, self.tr("Flash Script"), @@ -272,7 +272,7 @@ if not aw: return - if not (aw.isPy3File() or aw.isPy2File()): + if not (aw.isPyFile() or aw.isMicroPythonFile()): yes = E5MessageBox.yesNo( self.microPython, self.tr("Save Script as 'main.py'"),
--- a/eric6/Utilities/__init__.py Fri Aug 30 19:00:38 2019 +0200 +++ b/eric6/Utilities/__init__.py Fri Aug 30 19:07:18 2019 +0200 @@ -1605,7 +1605,12 @@ already (Editor object) @return Python version if file is Python2 or Python3 (int) """ - pyAssignment = {"Python": 2, "Python2": 2, "Python3": 3} + pyAssignment = { + "Python": 2, + "Python2": 2, + "Python3": 3, + "MicroPython": 3, + } if not editor: viewManager = e5App().getObject('ViewManager')