Python has become an indispensable tool to embedded software developers. Whether Python is being used to provide a GUI to control a system, acquire data or even used to write the embedded software (think MicroPython), chances are that Python has a place in your development process. In this article, we will present several resources that readers can use to learn Python.
Resource #1 – Purchase a good Python book
This might seem a bit old fashioned, but when I’m learning a programming language or a new concept, I like to start with a book. One can do a quick search on Amazon for Python books and would quickly discover that there are over 6,000 books to choose from! I obviously have not reviewed them all but there are several that I’ve found to be quite helpful. These include:
One of my favorites is Mark Lutz “Learning Python” which is almost 1700 pages long and covers every topic that someone new to Python needs to learn. I’ll be honest, I have not read it cover to cover but when I’m working with Python I often keep this book close so that I can review critical concepts.
Resource #2 – Online Python Tutorials
I’ve always found that looking to multiple, experienced resources can help to bring new insights into how to use a language or technique. One online resource that I have found to be extremely helpful is https://www.w3schools.com/python/. W3Schools provides several tutorials that are great for developers just getting started with Python. The tutorials are grouped into several categories:
- File handling
- Python reference
Even if you are already an experienced Python developer, you may find the references from the site to be worthwhile. If W3 Schools doesn’t fit what you are looking for, doing a quick search in your favorite search engine will undoubtedly provide several additional results.
Resource #3 – Reference Guides
Learning Python is one thing, but chances are you’ll need to periodically access a language reference that doesn’t just provide the how-to’s with an example but also provides Python wisdom such as best practices. A great online reference guide is “A Hitchhikers Guide to Python”. This guide does come in book form through O’Reilly but there is an online, living document that is kept that is open to any developer to contribute. The guide includes useful sections such as:
- Getting Started
- Python Development Environments
- Writing Great Python Code
- Scenario Guide for Applications
- Shipping Great Python Code
- General Notes
This guide has a great wealth of knowledge that will quickly help a novice developer get up to speed.
Resource #4 – College courses
Another great resource for developers interested in learning Python is to explore the course offerings their local universities offer. Programming has become so important that it is highly likely that you will be able to find a course at even a local community college or high school. A course based in a physical classroom can have the advantage that you learn consistently over a period of time that reinforces and tests your programming skills. I’ve seen many developers, including myself, who start to learn a technique or skill and then get caught up in project work or other activities and then have to keep relearning.
Resource #5 – Your own ingenuity
I’ve always found that nothing forces you to learn how to use a language more than actually using it. Selecting a series of small problems that need to be solved or a larger program that then needs to be decomposed into smaller programs is a great way to learn. For example, let’s say that we decide we need a program that will receive sensor data from an embedded system over a serial interface and then log that information to a file. Looking at such a simple need results in a developer needing to learn how to:
- Receive serial data
- Store the data locally in memory
- Possibly process and display that information
- Open, write, read and close a file
- Handle errors
There are surely plenty of other activities that would be needed in such an application but from a high-level stand point, the developer will be provided with direction as to what they should investigate and learn next.
Python has become an important programming language not just to embedded systems but to general application programmers as well. If you haven’t dove in yet and learned how to write Python applications, you’ll find that these five resources will help you digging and get up to speed as quickly as possible.