Python Python Programming Basics: IDLE vs Command Line

  • Thread starter Thread starter DrummingAtom
  • Start date Start date
  • Tags Tags
    Python
Click For Summary
IDLE is a Python development environment that includes a command line for executing Python commands, along with additional tools like a debugger and text editor. In contrast, the operating system's command line, such as the Windows cmd, allows access to OS commands but not directly to Python code without running scripts. While learning Python, the choice between Windows and Linux/Unix depends on personal comfort, as Python functions similarly across platforms. The skills acquired in one operating system will generally transfer to others. Ultimately, the focus should be on mastering Python, regardless of the operating system used.
DrummingAtom
Messages
657
Reaction score
2
I just started learning programming and am a little confused about the difference between IDLE and the "Commands Line." What's the difference?
 
Technology news on Phys.org
IDLE is a Python development environment, which INCLUDES a command line (that's the window with the 3 arrows >>> that you can type Python commands into), as well as other utilities like a debugger and a text editor. There is another kind of command line your book might refer to, the operating system's shell, which uses some other language like Bash (not Python), and can be used for things like running programs and moving files around.
 
If you are learning from a book and are on windows, then likely what they mean by a command line is the prompt you get if you go Start|Run, type in cmd and click ok. This would then give you a black command line that you can run programs from (including navigating to your python script directory and running scripts using python <script>). This gives you complete access to OS commands but no access to python code without running a python script or just running python to start an interactive session.

IDLE on the other hand has as part of it and interactive python interpreter. This let's you type in lines of python code and it will execute them immediately (or in the case of functions and classes, they will be defined as soon as you have finished the block of indented code). This gives you complete access to the python library but no access to the OS commands without using a system call of some description.
 
Thanks for the answers. Another question is should I be learning Python in Windows or Linux/Unix? The tutorial I'm using explains both operating systems. Am I wasting my time learning the Windows side?
 
DrummingAtom said:
Thanks for the answers. Another question is should I be learning Python in Windows or Linux/Unix? The tutorial I'm using explains both operating systems. Am I wasting my time learning the Windows side?

Other than maybe some of the software you use to develop it, Python should be the same on all operating systems as far as I know. Do it on whatever platform you feel most comfortable on to start with and everything you learn will be someday applicable to other operating systems as well.
 
Did you read ESR's how to be a hacker? Well he states that learning to hack under a closed source os is like learning to dans in a body cast. That is quit true in a way because you need to read some source to learn good programming skills but I started in windows and it was'nt to bad but I am now more pleased with my penguin ;-)

How to be a hacker http://catb.org/~esr/faqs/hacker-howto.html
and ESR's home http://catb.org/~esr/
Here youl find some good stuff to put you on the right track.

Good luck!
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
Replies
6
Views
3K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 11 ·
Replies
11
Views
938
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K