This section provides a high level overview of how the various parts of Mu fit together.
The key concepts you should know are:
Mu is a modal editor: the behaviour of Mu changes, depending on mode.
There are a number of core features and behaviours that are always available and never vary, no matter the mode.
The text area into which users type code is based on a Scintilla based widget.
Mu is easy to internationalise using Python’s standard
gettextbased modules and tools.
Mu’s code base is small, well documented and has 100% unit test coverage.
The code is found in the
mu directory and organised in the following way:
The application is created and configured in
Most of the fundamental logic for Mu is in
Un-packaged third party code used by Mu is found in
The Python3 debugger consists of a debug client and debug runner found in the
debuggernamespace. A description of how the debugger works can be found in Python Runner/Debugger.
Interacting with the UI layer is done via the
Windowclass in the
interface.mainmodule. Mu specific UI code used by the
Windowclass found in the other modules in the namespace.
Internationalization (I18n) related assets are found under
locale. Learn how this works via Internationalisation of Mu.
Modes are found under the
modesnamespace. They all inherit from a
BaseModeclass and there’s a tutorial for Modes in Mu.
Graphical assets, fonts and CSS descriptions for the themes are all found under
All classes, methods and functions have documentation written for humans. These are extracted into the Mu API Reference.
Mu’s Test Suite is in the
test directory and filenames for tests relate
directly to the file they test in the Mu code base. The module / directory
structure mirrors the organisation of the Mu code base. We use PyTest’s assert
based unit testing. All tests have a comment describing their intent.
The documentation you’re reading right now (i.e. that written for developers)
is found in the
docs directory. We use Sphinx
to write our docs and host them on ReadTheDocs.
Other documentation (tutorials, user help and so on) is on Developing Mu’s Website.
utils directory contains various scripts used to scrape and / or build
the API documentation used by Mu’s autocomplete and call tip functionality.
The other assets in the root directory of the project are mainly for documentation (such as our Code of Conduct), configuration (for testing) or packaging for various platforms (see Packaging Mu).
If you want to make changes please read Contributing to Mu.