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

Learning Python

  1. Sep 20, 2005 #1
    I want to start learning python. Lots of people I know say it's a very good language. Right now I know Java and a little bit of C++, but I'd like to experiment with some other languages, specifically Python. Right now I've got Python 2.4 installed on my PC, now I need to know what to do from here. I've run some google searches to see if there are some sites that can provide an introduction to Python, but I haven't found any good ones. So if anyone can recommend a compiler and text editor for Python I'd really be grateful.
     
  2. jcsd
  3. Sep 20, 2005 #2
    go to python.org. the tutorial is really great.

    other than that, O'Reily books are awesome.
     
  4. Sep 20, 2005 #3

    dduardo

    User Avatar
    Staff Emeritus

    Python is an interpreted language, meaning you don't actually compile anything, therefore there is no such thing as a python compiler.

    You have two options in terms of running code:

    1) Write your code in a text editor and then execute the code:

    Example: helloworld.py

    Code (Text):

    #!/usr/bin/python

    print 'Hello World'
     
    ./helloworld.py
    or
    python helloworld.py

    2) You can enter into the command-line interpreter and just start entering commands like you do in Matlab or other programs like that.

    ------------

    Python is a very nice language. There are no semicolons and braces to remember.

    Just look at the tutorial and you should pick it up rather quickly since you are already famaliar with programming:

    http://www.python.org/doc/2.4.1/tut/tut.html
     
    Last edited: Sep 20, 2005
  5. Sep 20, 2005 #4

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  6. Sep 20, 2005 #5
    Thanks, guys. VPython looks pretty cool. Can't wait to start programming!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Learning Python
  1. Java or Python (Replies: 13)

Loading...