1. Home
  2. Python
  3. Python Tutorials
  4. Python – IDLE

Python – IDLE

Python IDLE

Introduction

IDLE stands for Integrated Development and Learning Environment. Each Python installation comes with an integrated development and learning environment, which you’ll see short for IDLE or even IDE. It is a class of applications that helps you write code more efficiently. While there are many IDEs for you to choose from, the Python IDLE is very bare-bone, making it the perfect tool for a beginner programmer.

Key features of IDLE:

  • Python shell with syntax highlighting,
  • Multi-window text editor,
  • Code Autocompletion,
  • Intelligent indenting,
  • Program animation and stepping, which allows for running one line of code at a time useful for debugging,
  • Frequent breakpoints,
  • Finally, call stack visibility.

How to Start IDLE?

IDLE provides a fully featured text editor for creating Python scripts that includes features such as syntax highlighting, auto completion, and smart lent.

To start the IDLE interactive shell, find the IDLE icon in the Start menu and double click on it.

Launch Python IDLE on Windows

After double click, you will see IDLE, where you can write the code and execute it. As shown below.

Running Python IDLE Window

How to use the Python IDLE Shell

Shell is the default mode of operation for Python IDLE. When you click the icon to open the program, the shell is the first thing you see:

To execute the Python script, create a new file by selecting File -> New File from the menu.

Create Python Script with IDLE

Enter the details and save the file with .py using File -> Save. For example, save the following code as hello.py.

Then, run the editor window, and see the output:

Running python scritp in IDLE