If you are a Python programmer, you are spoilt for choice with the number of editors that you can use.

If you have a Raspberry Pi with the latest version of Raspbian, you have three options already built in. If you go to the programming menu you will find Idle (for Python 2 and 3), Geany, and now, a new kid on the block Thonny.
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 go to a terminal window.
The Idle editor comes built-in with Python and is the one that many tutorials use by default. It’s a perfectly fine, basic, editor that also has a Python shell built in for interactive programming. What more could you want?
Well, maybe 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.
I have tended to use Geany for precisely this reason. For example, if I am building a Web app with Python, I 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 them all.
You can run programs from within Geany but it doesn’t have a Python shell.
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 not using a Pi or the latest version of Raspbian, Thonny is simple to install and comes with Python 3 built in.
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. 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 value.
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 visualise the operation of the program is extremely helpful for learners and also for tracking down bugs in your code.
So, I think I’ll carry on using Geany for Web apps but, it seems to me, that Thonny is a great choice for Python only programming, particularly if you are a beginner.

Just Enough Python
An brief introduction that will get you programming quickly Advertisement

Source link

Thonny, Idle or Geany?

Leave a Reply

Your email address will not be published. Required fields are marked *