IDLE Python, an integrated development environment for learning

about IDLE Python

In the next article we are going to take a look at IDLE Python. It's about a integrated development environment for learning Python, which is an alternative to the command line. Some operating systems come with the Python interpreter, but on other systems it may be necessary to install it. On Gnu / Linux, IDLE is distributed as a separate application which can be installed from the repositories of each distribution.

This IDE is free and open source. Although its interface is much less ornate than other IDEs, there is no shortage of features with IDLE. In the following lines we are going to see how easy it is to install it in Ubuntu, 18.04 in this example.

General features in IDLE Python

IDLE stands for Integrated Development Environment and includes features such as:

  • Been encoded in Python 100% pure, using the toolkit tkinter GUI.
  • Es multi platform. It works almost the same on Windows, Unix, and macOS.
  • Multi-window text editor with undo multiple.
  • Syntax highlighting.
  • It will offer us the option of autocomplete.
  • Smart indentation.
  • Windows of Python shell (interactive interpreter) with coloring of code input, output and error messages.
  • Includes a debugger with persistent breakpoints, steps, and display of global and local namespaces.
  • Possible search within any window, replace within editor windows and search through multiple files (grep).

For more information about this project, you can consult the documentation they offer in their site.

Install IDLE Python on Ubuntu

The only things we will need for this to work are an Ubuntu system and a user account with sudo privileges. Before starting an installation, it's always smart run an update of the software available in the repositories. To do this we will only have to open a terminal window (Ctrl + Alt + T) and write in it:

sudo apt-get update; sudo apt-get upgrade

Once the update is complete, reboot if necessary.

La IDLE installation it is so simple that we will only need to write in a terminal (Ctrl + Alt + T):

sudo apt-get install idle

Once the installation is complete, IDLE is ready to go.

How to use IDLE

If we click on your desktop menu, we will find two entries for IDLE. One is labeled IDLE (using python 3.6.9, in my case) and the other just IDLE.

When the IDLE window opens, everything is ready to start coding. The main IDLE window is an interactive Python environment in which Python commands can be written after the prompt >>> (in English, prompt). By pressing Intro, IDLE will execute the order immediately. If the order produces a result, it will be shown in blue and without the request symbol. For example, in the IDLE indicator we can write the line:

IDLE Python hello world

print("Hola, Ubunlog")

After pressing Intro on the keyboard, you should see something like the above screenshot.

Write your program to a file

IDLE is also an elementary program editor, which allows you to write programs, save them to files and run them. The main IDLE window is always the interactive environment, but it is also the window where the programs will run.

To create a program file with IDLE, we will have to open a new window using the menu File> New File (or the keyboard shortcut Ctrl + N).

example python file

Once we finish writing our code, in order to execute a program edited in IDLE, it is first necessary to save it. Once saved, can be run via the menu option Run> Run module (we can also use the F5 key).

And this is a basic look at how you can install and use IDLE Python in Ubuntu. For more information on how to get the most out of this integrated development environment, you can take a look at the official documentation.

Using IDLE can be a good learning experience for new users. Although we must not forget that this is only one of the many options available as you can see in the following list.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.