3 Excellent Python IDEs for beginners - Thonny, Geany or Idle

Professional Python programmers, looking for an Editor or IDE, are spoiled for choice.

But if you are a Beginner, or a Teacher, what is the best bet?

Python IDEs Thonny, Geany and Idle
Python IDEs Thonny, Geany and Idle

Python is definitely the language to learn these days. If you are interested in Data Science, Data Analysis, Artificial Intelligence, then Python is the programming language that you are likely to use.

But Python is a great general purpose language, too. You can build Desktop Applications and Web Apps, for example.

But to learn the language you need to be able to practice and for that you will need an editor, or IDE (Integrated Development Environment). So, which IDE is good for beginners?

A good start might be to look at the Raspberry Pi. It is designed for beginners and so it's worth noting that they provide three options for programming in Python: Idle, Geany, and, a relatively new kid on the block, Thonny.

And 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 Python IDE
Idle Python IDE

The Idle editor comes built-in with Python 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

Idle Python IDE
Geany Python IDE

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 Python IDE
Thonny Python IDE

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 is not intended to 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.


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.

Need An introduction to Python?


Popular posts from this blog

Simple Data Visualization Tools in Python and Pandas

Setting Up Jupyter Notebooks for Data Visualization with Anaconda