Skip to main content

A simple editor for beginner programmers.

Project description

Mu - an editor for beginner programmers

What?

Mu is a simple code editor for beginner programmers based on the feedback given to and experiences of the Raspberry Pi Foundation’s education team.

It’s written in Python and works on Windows, OSX, Linux and Raspberry Pi.

Why?

There isn’t a cross platform Python code editor that is:

  • Easy to use;
  • Available on all major platforms;
  • Well documented (even for beginners);
  • Simply coded;
  • Easily translated;
  • Currently maintained; and,
  • Thoroughly tested.

Mu addresses these needs.

In the Python world, teachers, students and other beginner programmers are forced to use one of the following options:

  • IDLE - the educationally problematic editor that comes bundled with Python.
  • A third party IDE (integrated development environment) for teaching. If “IDE” sounds complicated for beginner programmers, that’s because it is.
  • An intimidating professional programmer’s editor such as vi or emacs.

Such tools are fiddly, complicated and full of distracting “features”. They are usually inappropriate for teaching and learning ~ complexity impedes a novice programmer’s first steps.

How?

Mu’s philosophy is:

  • Less is more (remove all unnecessary distractions);
  • Keep it simple (so Mu is easy to understand);
  • Walk the path of least resistance (Mu should be easy to use);
  • Have fun (learning should be a positive experience).

Mu is modal. It works as a general purpose Python 3 editor, as a MicroPython editor for the BBC’s micro:bit device, or as a CircuitPython editor for Adafruit boards.

Mu’s code is simple - it’s commented and mostly found in a few obviously named Python files. This has been done on purpose: we want teachers and kids to take ownership of this project and organising the code in this way aids the first steps required to get involved (everything you need to know is in obviously named files).

Development

If you only want to use Mu then please ignore this section. If you’d like to contribute to the development of Mu read on…

The source code is hosted on GitHub. Please feel free to fork the repository. Assuming you have Git installed you can download the code from the canonical repository with the following command:

$ git clone https://github.com/mu-editor/mu.git

Ensure you have the correct dependencies for development installed by creating a virtualenv and running:

$ pip install -r requirements.txt

To run the local development version of “mu”, in the root of this repository type:

$ python3 run.py

There is a Makefile that helps with most of the common workflows associated with development. Typing “make” on its own will list the options thus:

$ make

There is no default Makefile target right now. Try:

make clean - reset the project and remove auto-generated assets.
make pyflakes - run the PyFlakes code checker.
make pep8 - run the PEP8 style checker.
make test - run the test suite.
make coverage - view a report on test coverage.
make check - run all the checkers and tests.
make dist - make a dist/wheel for the project.
make publish-test - publish the project to PyPI test instance.
make publish-live - publish the project to PyPI production.
make docs - run sphinx to create project documentation.
make translate - create a new messages.pot file for Mu related strings.
make translateall - as with translate but also containing all API strings.

Before contributing code please make sure you’ve read CONTRIBUTING.rst. We expect everyone participating in the development of Mu to act in accordance with the PSF’s code of conduct found in the CODE_OF_CONDUCT.rst file.

Release History

1.0.0.beta.12

  • Update “save” related behaviour so “save as” pops up when the filename in the tab is double clicked.
  • Update the debugger so the process stops at the end of the run.
  • Ensure the current working directory for the REPL is set to mu_mode.
  • Add additional documentation about Raspberry Pi related API.
  • Update micro:bit runtime to lates MicroPython beta.
  • Make a start on developer documentation.

1.0.0.beta.11

  • Updated Python 3 REPL to make use of an out of process iPython kernel (to avoid problems with blocking Mu’s UI).
  • Reverted Save related functionality to prior behaviour.
  • The “Save As” dialog for re-naming a file is launched when you click the filename in the tab associated with the code.

1.0.0.beta.10

  • Ensured “Save” button prompts user to confirm (or replace) the filename of an existing file. Allows Mu to have something like “Save As”.
  • Updated to latest microfs library for working with the micro:bit’s filesystem.
  • Fixed three code quality warnings found by https://lgtm.com/projects/g/mu-editor/mu/alerts/?mode=list
  • Updated API generation so the output is ordered (helps when diffing the generated files).
  • Updated Makefile to create Python packages/wheels and deploy to PyPI.
  • Explicit versions for packages found within install_requires in setup.py.
  • Minor documentation changes.

1.0.0.beta.9

  • Debian related packaging updates.
  • Fixed a problem relating to how Windows stops the debug runner.
  • Fixed a problem relating to how Windows paths are expressed that was stopping the debug runner from starting.

1.0.0.beta.8

  • Updated splash image to reflect trademark usage of logos.
  • Refactored the way the Python runner executes so that it drops into the Python shell when it completes.
  • The debug runner now reports when it has finished running a script.

1.0.0.beta.7

  • Update PyInstaller icons.
  • Fix some tests that fail on older version of Python 3.
  • Add scripts to extract API information from Adafruit and Python 3.
  • Add generated API documentation to Mu so autosuggest and call tips have data.
  • Ensure translation files are distributed.

1.0.0.beta.6

  • Pip installable.
  • Updated theme handling: day, night and high-contrast (as per user feedback).
  • Keyboard shortcuts.

1.0.0.beta.*

  • Added modes to allow Mu to be a general Python editor. (Python3, Adafruit and micro:bit.)
  • Added simple visual debugger.
  • Added iPython based REPL for Python3 mode.
  • Many minor UI changes based on UX feedback.
  • Many bug fixes.

0.9.13

  • Add ability to change default Python directory in the settings file. Thanks to Zander Brown for the contribution. See #179.

0.9.12

  • Change the default Python directory from ~/python to ~/mu_code. This fixes issue #126.
  • Add instructions for installing PyQt5 and QScintilla on Mac OS.
  • Update to latest version of uFlash.
  • Add highlighting of search mathes.
  • Check if the script produced is > 8k.
  • Use a settings file local to the Mu executable if available.
  • Fix bug with highlighting code errors in Windows.
  • Check to overwrite an existing file on the micro:bit FS.
  • Start changelog

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mu-editor-1.0.0b12.tar.gz (1.4 MB view hashes)

Uploaded source

Built Distribution

mu_editor-1.0.0b12-py3-none-any.whl (1.4 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page