Running Python programs in Linux is as easy as executing a Python file in the terminal.
But this is not very convenient for most people, and it does not help debugging programs.
There are a variety of IDEs and text editors available for Python development. PyCharm Community Edition is available for Linux users.
I recently came across another IDE designed specifically for Python beginners. I love the idea of this app, so I'm sharing it with you here.
Thonny is a cross-platform open source Python IDE for beginners
Thonny feels like a Python version of Eclipse in terms of UI and UX. Considering that most C and Java beginners start with Eclipse, and many continue to use Eclipse later on, this isn't entirely a bad thing.
This is not a new tool. It's been around for several years. Now recommended to everyone.
Thonny focuses on Python, with features to help Python beginners understand how their programs behave. Let's take a look at these features.
Thonny comes with Python, so you don’t need to put in extra effort to install Python. This isn’t a big deal for Linux users since most distributions come with Python installed by default.
The interface is very simple. It provides you with an editor where you can write a Python program and hit the run button or use the F5 key to run the program. The output is shown at the bottom.
In View ->Variables, you can see the values of all variables. No need to print them all.
Use the debugger to step through your program. You can access it from the top menu or use the Ctrl F5 keys. You don't even need breakpoints here. You can use F6 to debug in large steps, or F7 to debug in small steps.
#In small steps, you can learn how Python sees your expressions. This is very helpful for new programmers to understand why their program behaves a certain way.
For function calls, it opens a new window with a separate local variable table and code pointer. Super cool!
Beginners often make simple grammatical errors, such as missing brackets, quotation marks, etc. Thonny will immediately point this out in the editor.
Local variables are also visually distinguished from global variables.
You don’t have to type everything. Thonny supports automatic code completion, which helps in coding faster.
From the tool, you can access the system shell. From here you can install new Python packages or learn to work with 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 Management Packs. It will open a window where you can install Pip packages from this GUI.
Learning Python is good enough, right? Let's see how to install it.
Thonny is a cross-platform application. It's available for Windows, macOS, and Linux.
This is a popular application that you can find in the repositories of most Linux distributions. Just look for it in your system's Software Center.
Alternatively, you can always use your Linux distribution’s package manager.
On Debian and Ubuntu based distributions, you can install it using the apt command.
linuxmi@linuxmi /home/linuxmi/www.linuxmi.com ⚡ sudo apt install thonny
After installation, you can search in the menu and find it from there.
Thonny is a great tool for Python beginners. It's not just for experts, it's more suitable for use in schools and universities. Students will find it helpful to learn Python and understand how their code behaves in a certain way. In fact, it was originally developed at the University of Tartu in Estonia.
In general, it is a good software for Python learners.
The above is the detailed content of How to choose the best IDE for teaching Python programming in schools?. For more information, please follow other related articles on the PHP Chinese website!