Python is popular programming language used by a lot of people from different professions. Python is a scripting language supported by different platforms and operating systems like Windows, Linux, MacOs, BSD etc. Developing and running python can be done in different ways but in practical way we generally need some editor. Python Idle is simple editor which provides basic features of advanced Integrated Development Environments.
Install For Windows
In Windows Idle is provided with the Python libraries and executable. In this tutorial we will download Python 3.6 with Idle from the following link. We prefer 64 bit Python.
Install For Ubuntu, Debian, Mint, Kali
We can install
idle with different ways but easiest and reliable way is using package manager named
$ sudo apt install idle
Install For Fedora, CentOS, RHEL
We can install Python Idle in the Fedora, CentOS and RHEL distributions like below.
$ sudo yum install idle
Interactive Python Shell
Idle main window is an interactive Python shell. We can use this shell for simple and fast scripting. This console provides following features.
- Creating and saving script files
- Editing script files
- Creating new Python shells
- Debugging Python scripts
Create New File
Idle opens Python shell by default. Shell can be used simple scripts or test but for bigger projects we should create a python script file and save our code to this file. We can create a script file from
New File menu like below. After completing coding we should save the file with related name.
Run Script File
We will use following code to run. We will use
F5 in order to run following code. Alternative way to run is click
Run Module from menu.
age = input("Say your age:") print("You are "+age+" years old")
This will open Idle shell window and run our script in the Python shell as we can see below.