Basic Python questions

  • Thread starter DrummingAtom
  • Start date
  • Tags
    Python
  • #1
659
2
I just started learning programming and am a little confused about the difference between IDLE and the "Commands Line." What's the difference?
 

Answers and Replies

  • #2
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.
 
  • #3
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.
 
  • #4
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?
 
  • #5
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.
 
  • #6
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!
 

Suggested for: Basic Python questions

Replies
1
Views
464
Replies
10
Views
1K
Replies
3
Views
194
Replies
2
Views
108
Replies
6
Views
282
Replies
24
Views
916
Replies
2
Views
287
Replies
1
Views
513
Back
Top