Python IDLE Basics - Difference between Shell and Editor

preview_player
Показать описание
In this video I show the difference between the Shell window and the Editor window in Python's IDLE software.

When you install Python you get IDLE by default. A good tool for beginners that lets you write, run and save your Python programs directly.

When you first open IDLE you will see a "Shell" window (it has writing and version info at the top). This is good for testing and running very small sections of code, but you can't use it to build more complex scripts.

For example. If you entered a print statement into the Shell like this:

print ('I am learning Python')

And pressed enter to keep writing, you would be stuck because hitting Enter in a Shell will RUN the program...you will see the output of the print statement.

If you wrote the same print statement in the blank editor window, and hit Enter, the cursor just drops down a line without running the code. You can carry on building your program.

If you are seeing a Shell window, hit FILE and NEW-FILE to get an "Editor" window, which is completely blank compared to the shell.

In this video I
* Demonstrate the difference between the Shell and Editor windows
* Show some of the ways you can then re-open your saved program (manually or command prompt)

This might seem a bit simple to some, but I remember when I first opened up IDLE and had no idea about the difference between the Shell and editor. It was frustrating.

I hope this helps.
Рекомендации по теме
Комментарии
Автор

Thank you for this, this was a confusion of mine since I'm really new to using these programs.

armando
Автор

Supa noob here sayin fanks, totally unrelated comment incoming... Loving the CHAPPiE wallpaper, still a good movie after all this time, Dist 9 is also 1 of the good 1s 8D

acerexdeus
Автор

Can you tell me the difference between Python Shell and Editor, because I am not very good at English?

isolation-wdni