Both Python and MicroPython are powerhouse programming languages. Each of them is capable of supporting your programming needs to almost the limits of your imagination. Both languages are transportable, open-source, growing in popularity, comparatively easy to learn and free! So how exactly do they differ from each other?

Transcript

Hey gang, Tim here from Core Electronics and today we're springing into the capabilities and differences between the programming languages of Python and MicroPython. Programming is something that every modern maker should have some grasp of. Figuring out exactly what program is best for your particular purpose can be half of the battle.

I've had a chat previously about programming but as an overview, programming is simply the process of creating instructions for a computing device to comprehend and execute. These instructions are referred to as a software program. Once the software program is run, the computing device will perform the specified task. The programming language is a set of commands, directives and other syntaxes which gives you a vocabulary to create these software programs.

Now Python and MicroPython are powerhouse programming languages. Each language can support your programming needs to almost the limits of your imagination. Both languages are transportable, open source, growing in popularity, comparatively easy to learn and free. They also have similar syntax, keywords and operators.

So how exactly do they differ from each other? The biggest factor is that Python, because of its intensive processing demands, requires a full-size computer, laptop or cloud server to run effectively. In comparison, the hardware requirements of MicroPython are orders of magnitude lower. This means MicroPython can operate effectively on microcontrollers and microprocessors.

To clarify, a microcontroller is a compact integrated circuit designed to govern a specific operation inside an embedded system. To the table, I brought an Arduino Uno R3 which is a perfect example of this. A microprocessor on the other hand is an integrated circuit that contains all the functions of a central processing unit of a computer which includes an operating system. To demonstrate this, I brought to the table a Raspberry Pi 4 model B, 8 gigabytes, which is a perfect example of a microprocessor. Both these devices can easily fit in the palm of your hands and encourage and make us rainbows of creativity.

Now with most recent modern technology, this concept of MicroPython for credit card-sized computers, whereas Python for large computational devices, this concept has just not become so cut and dry. Some microprocessors have become so powerful they can functionally run Python. The newest Raspberry Pi 4 model B, 8 gigabytes is a perfect example of this.

So what does it take to make a streamlined, slimmed down Python? Start by ripping out heaps of libraries leaving only a subset of library modules. A module is a Python object with an arbitrarily named attribute which you can bind and reference. Simply a module is a file consisting of Python code. A library is a collection of a whole bunch of these modules. Furthermore, of the few libraries left, remove unnecessary functions and classes that come with Python. A function is a block of code which only runs when it's called. Classes are essentially a template to determine variables and functions of objects. Objects are simply collections of data. Some features that will not cater well to constrained systems are also removed and some freedoms with syntax are eliminated. This is a simplification of what Damien George, an Australian programmer and physicist, did in 2014, turning Python into what we see today as MicroPython.

These changes mean MicroPython is an extremely compact programming language. Takes up less than a megabyte of storage space and under load utilizes only around 16 kilobytes of RAM. If you're interested in each and every detail at a high level, come take a look at the write-up on this topic where I go very deep into this.

Jumping into the computer, you can see I'm on the Core Electronic website. Here's a particular write-up and if you jump on deep dive on differences between Python and MicroPython, it will talk about the real nitty-gritty details between Python and MicroPython.

Both Python and MicroPython programming languages are free to download and use. Jumping over here, you can see where you can download Python and jumping over here, you can see where you can download MicroPython. They're also open source so it gives individuals the freedom to modify, contribute, and propose improvements.

There are also online browser-based emulators for both Python and MicroPython so you don't even need to download anything to experience these languages.

Also, if you're interested in MicroBoards that will run MicroPython brilliantly, come back to that web page that I showed you before and under MicroPython Compatible Boards, you'll see a whole bunch of MicroBoards that will run Python.

Hope this has been helpful and inspired future programming endeavours in your life. Until next time, stay cozy. Bye.

Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.