Mu has a “Mode” button which can be used to write Python, MicroPython and CircuitPython. Mu has one feature that elevates it above other beginner editors. On Windows, use the py Python launcher in combination with the -m switch: py -2 -m pip install SomePackage default Python 2 py -2.7 -m pip install SomePackage specifically Python 2.7 py -3 -m pip install SomePackage default Python 3 py -3.4 -m pip install SomePackage specifically Python 3.4. If you are starting out with Python, Mu is an excellent choice to introduce the language. Modules are libraries of code that can be used to add new features, for example RPi.GPIO and GPIO Zero are modules that enable Python to talk to the Raspberry Pi GPIO. This is where the ease of Mu works against it, as there is no means to install Python modules. The default is to write Python 3 code, to be run on our machine. It can output the results of our code and it can be used to access the REPL. A builtin checker and tidy application will check and format your code using Python style guidelines. We can zoom in and out of the code, useful when presenting to large groups. A plotter can be used to visualize data via a graph. At a high level, pyenv intercepts Python commands using shim executables injected into your PATH, determines which Python version has been specified by your application, and passes your commands along to the correct Python installation. The Python Shell (REPL, Read, Eval, Print, Loop) is available to test ideas. Large icons and clear text identify the function of each button.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |