3 Excellent Python IDEs for Beginners — Thonny, Geany and Idle

If you are a Python novice, or a teacher, what is the best Python IDE?

Alan Jones
Nov 10, 2019 · 5 min read
Python IDEs Thonny, Geany and Idle
Python IDEs Thonny, Geany and Idle

A good start, for inspiration, might be to look at the Raspberry Pi. It is designed for beginners and they provide three options for programming in Python: Idle, Geany, and Thonny.

These are not a bad place to start for any beginner.

They are lightweight applications that will run happily on almost any hardware and any operating system. They are also easy to install and use.

All three editors provide the basic features such as colour coding of the program code and the ability to run your programs without having to use the command line in a terminal window.

IDE 1: Idle

Idle the Python editor
Idle the Python editor

The Idle editor often comes built-in with a Python installation and is the one that many tutorials use by default. It’s a fine, basic, editor that also has a Python shell built in for interactive programming.

When you start Idle up, you get the shell window. This allows you to execute python commands and see the results immediately without having to create a program. This can be useful for trying things out.

When you want to create a program an editor window pops up. Editing is straightforward but when you run the program you need to go back to the shell window to see the results. Having separate windows does not seem a very modern approach, indeed it hasn’t changed much for a very long time, but you can arrange them to be side by side, on the screen and it is quite usable.

So Idle is a perfectly good editor: what more could you want?

IDE 2: Geany

Geany an IDE for Python
Geany an IDE for Python

Well, maybe you want an editor that can be used for more than one programming language.

Geany is just that. Geany is clever enough to know how to correctly colour and indent code depending on the type of file you are using. It can be used for many languages including Java, PHP, HTML and a host of others. It uses the file name extension to identify the file type (.py for Python, .html for HTML, etc.) so you need to give the file a name before the colour coding begins to work.

In the past, I have used Geany precisely because it is suitable for different programming languages.

For example, if you want to build a Web app with Python, you can have all the files (Python, HTML, CSS, etc.) open at the same time in the same editor and it knows how to deal with each one.

You can run programs from within Geany but it doesn’t have a Python shell, so interactive sessions are not possible. When you run a program, a terminal window is created and the program runs there.

One thing to bear in mind is that by default, Geany assumes that you are using an interpreter called “Python” (the interpreter is the program that runs the program).

Err, well that seems reasonable, doesn’t it?

Well, yes, except that on many, if not all, systems this is the Python 2.7 interpreter. The latest Python interpreter is Python 3.x and the command to execute that is “Python3”. But this is easily fixed by simply making a simple edit to the ‘build command line’, which only takes a few seconds and only needs to be done once.

IDE 3: Thonny

Thonny a complete Python environment and IDE suitable for beginners
Thonny a complete Python environment and IDE suitable for beginners

And so to Thonny.

Thonny is a Python-only editor but for that reason it is able to provide some excellent support. If you are using a Raspberry Pi (or Raspbian on a PC), you already have Thonny, if not, it is simple to install and, for Windows and the Mac, comes with Python 3.x built in. (It can’t be used with previous versions.)

It was built with beginners in mind and has features that are very useful for both teachers and learners.

When you start it up, Thonny displays an editor window and an interactive Python shell. So when you run a program you can see the editor and its output at the same time — no additional windows are created. The shell is also used for interactive commands, as usual.

But there is much more. You can open other windows that give you more information about the program that you are writing. For example, you can see the current value of each variable as the program runs and you can step through the program and see how the various operations change those values.

This single stepping through the program is a very powerful way of understanding how a programming language works. For example, when stepping through an expression, Thonny shows you all of the intermediate operations and displays the current value of the expression and variables.

This ability to visualize the operation of the program is extremely helpful for learners and also for tracking down bugs in your code.

Conclusion

Personally, I think I would carry on using Geany for building Web apps but, it seems to me, that, if you are a beginner, Thonny is a great choice for Python only programming because of its ease of use and built-in debugging.

Click on these links for Thonny, Geany and Python.

Instructions on how to download and install, for Linux, Windows and Mac, are on the respective web pages.

This article was originally published here:

The Startup

Medium's largest active publication, followed by +753K people. Follow to join our community.

Alan Jones

Written by

Technology, science and programming. Subscribe to my newsletter here: https://technofile.substack.com/ . Web page: https://alanjones.pythonanywhere.com/

The Startup

Medium's largest active publication, followed by +753K people. Follow to join our community.

Alan Jones

Written by

Technology, science and programming. Subscribe to my newsletter here: https://technofile.substack.com/ . Web page: https://alanjones.pythonanywhere.com/

The Startup

Medium's largest active publication, followed by +753K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store