Difference Between Python's IDLE and its command line

36,844

Solution 1

They are both the same thing but, IDLE is made to write python code so its better if you can to write on IDLE. You can also try Notepad++ its a pretty good program to write code on.

Solution 2

I am not sure what you question is, but here is a Windows-7 oriented answer of similarity and difference. In the start menu for Python x.y, you can select 'Python x.y (x bits)' to run python interactive in a text-line-oriented console window provided by Microsoft. The console handles key presses and mouse movements and clicks. When you hit , the console sends the line of text to python, which is waiting for input on sys.stdin. When Python processes the line, it sends output to sys.stdout or sys.stderr. This includes '>>> ' and '... ' prompts. The console displays the text for you to see.

In the start menu, you can instead select 'Idle ...'. Unless you have previously selected a different startup option, python run Idle code which uses the tkinter module which used tcl/tk to run a graphical user interface that somewhat imitates the console. The tkinter/tk gui handles key and mouse input and displays output. In both cases, some software besides the Python interpreter itself handles interaction between you and Python.

Some important differences:

  1. Cut, copy, and paste work normally. The Windows console is crippled in this respect.

  2. Idle colors input and output. The Windows console does not.

  3. Idle can display all unicode BMP (the first 64K) chars. The Windows console is limited by code pages.

For 1, 2, and 3, the console of other OSes may do as well or better than Idle.

  1. Idle lets you enter, edit, send, and retrieve complete statements. Interactive python with Windows console only works with physical lines.

Update, 2017/11:

Item 1 above: At least on current Win10, cut, copy, and paste work normally.

Item 3 above: At least on Win10, unicode works better in Command Prompt with 3.6+.

New item 5: The IDLE doc section, also available as Help => IDLE Help now has section '3.3. IDLE-console differences'.

Solution 3

IDLE is a very simple Integrated Development Environment. It runs the same python, libraries etc. as commant-line.

Even more basic (with less features) is IPython. Full feature IDE for Python is, for example, Eclipse with PyDev plugin, or LiClipse.

Share:
36,844
Donatas
Author by

Donatas

Updated on April 18, 2021

Comments

  • Donatas
    Donatas about 3 years

    What are the key differences between Python's IDLE and its command line environment? IDLE looks nicer, of course, and has some kind of GUI...

    Moreover, is IDLE treated the same as the shell? I mean, the shell is the middle layer between the user and Python's interpreter?

  • RKA
    RKA over 5 years
    This is a better explanation!