Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Basic Python questions

  1. Apr 25, 2009 #1
    I just started learning programming and am a little confused about the difference between IDLE and the "Commands Line." What's the difference?
     
  2. jcsd
  3. Apr 25, 2009 #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.
     
  4. Apr 26, 2009 #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 lets 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.
     
  5. Apr 26, 2009 #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?
     
  6. Apr 26, 2009 #5
    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.
     
  7. Jul 20, 2009 #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 cuz 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!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Basic Python questions
  1. Simple python question (Replies: 2)

  2. Basic python help? (Replies: 3)

  3. Python 3 question (Replies: 4)

  4. Basic python question (Replies: 2)

Loading...