A Linux and Open Source Web Portal
Last updated By
Running a Python program in Linux is as simple as executing the Python file in the terminal.
But that’s not very convenient for everyone and it doesn’t help you debug your programs. Too raw.
There are several IDEs and text editors that can be used for Python development. The PyCharm community edition is available for Linux users.
I recently came across another IDE specifically crafted for Python beginners. I liked the idea of this application and hence I am sharing it with you here.
Thonny feels like the Python version of Eclipse in terms of UI and UX. And that’s not entirely a bad thing considering most C++ and Java beginners start with Eclipse and many stay with it afterward.
It’s not a new tool. It has been on the horizon for some years now. I don’t code in Python so I never discovered it until recently.
Dedicated to Python, Thonny has features that help Python beginners understand how their program behaves. Let’s take a look at those features.
Thonny comes with Python so you don’t need to do additional effort for installing Python. That’s not a big deal for Linux users as most distributions have Python installed by default.
The interface is simple. It gives you an editor where you can write your Python program and hit the Run button or use F5 key to play the program. The output is displayed at the bottom.
From the View->Variables, you can see the values of all the variables. No need to print them all.
Run your program step by step by using the debugger. You can access it from the top menu or use the Ctrl+F5 keys. You don’t even need the breakpoints here. You can go into big steps with F6 or in small steps with F7.
In small steps, you can see how Python sees your expressions. This is very helpful for new programmers to understand why their program is behaving in a certain manner.
That’s not it. For function calls, it opens a new window with separate local variables table and code pointer. Super cool!
Beginners often make simple syntax errors like missing paranthesis, quotes etc. Thonny is points it out immediately in the editor itself.
Local variables are also visually distinguished from globals.
You don’t have to type everything. Thonny supports auto code completion which helps in coding faster.
From the Tools, you can access the system shell. From here you can install new Python package or learn to handle Python from the command line.
Please note that if you use Flatpak or Snap, Thonny may not be able to access the system shell.
Go to Tools and Manage packages. It opens a window and you can install Pip packages from this GUI.
Good enough features for learning Python, right? Let’s see how to install it.
Thonny is a cross-platform application. It is available for Windows, macOS and Linux.
It’s a popular application and you can find it in the repositories of most Linux distributions. Just look for it in your system’s software center.
Alternatively, you can always use the package manager of your Linux distribution.
On Debian and Ubuntu-based distributions, you can use the apt command to install it.
It downloads a bunch of dependencies and around 300 MB of packages.
Once installed, you can search for it in the menu and install it from there.
Thonny is a decent tool for beginner Python programmers. Not that experts cannot use it but it’s more suited to be used in the schools and colleges. Students will find it helpful in learning Python and understanding how their code behaves in certain manner. In fact, it was originally developed in University of Tartu, Estonia.
Overall, a good software for Python learners.
Like what you read? Please share it with others.
Filed Under: Software
Creator of It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries ranging from Agatha Christie and Sherlock Holmes to Detective Columbo & Ellery Queen. Also a movie buff with a soft corner for film noir.
I’m seeing references to Thonny for programming the Raspberry Pi Pico, but not sure whether it can connect directly to the Pico & use the serial interface a la the Mu editor. Any insight there?
I teach high school programming and love Thonny!!!
Thanks for sharing the feedback, Christopher.
So, I was right about this being an ideal tool for teaching in schools 🙂
agree fully, as a casual Python programmer
very clear and clean, user-friendly IDE
Join 75,000 other Linux users and start your journey to become a better, informed desktop Linux user.
It’s FOSS is Part of chmod777 Media Tech (OPC) Pvt Ltd· Built on Genesis Framework and Powered by UpCloud
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.
Thonny is an Ideal IDE for Teaching Python Programming in Schools – It's FOSS