The Python website http://www.python.org is an excellent resource for learning Python. http://numpy.scipy.org/ is good for learning Numpy, the numerical package built on Python. However, learning Damon requires little actual skill in either Python or Numpy, just a few basics. This tutorial will focus on Damon. The format will be "learning-by-doing" with minimal verbiage. Don't just read. Type each example by hand. The fingers remember what the brain forgets.
This part varies depending on the machine and the Python distribution you downloaded. In Windows, search for Python and double-click on something that looks like IDLE (Python GUI). This will open the Python interpreter. On the Mac, use Spotlight to search for IDLE and open. Make sure you're opening the right Python IDLE (the one you downloaded) -- you might have multiple versions on your system. You should end up with this: (My machine's a Mac and I'm using Python 2.7.2, the Enthought (EPD) distribution.)
Here, damon1 refers to a folder in Python's site-packages folder and core refers to a python module within the damon folder called core.py. When importing, you don't need to include the .py extension.
Note that you get an import error if you try to import something (blahblah) that doesn't exist in the usual places where Python looks. We have successfully imported Numpy, indicated by the lack of error message. I have abbreviated damon1.core as dmn and numpy as np. The abbreviation is up to you. In the rest of the tutorial, I import damon1.core as dmn.
Create a List, a Dictionary, and an Array
Lists and Dictionaries are Python's main data containers. Arrays are Numpy's data container.
Damon uses these data containers a lot, especially arrays. Play around with them. There is another Python container, "tuples", which are like lists but can't be changed. They are signified by parentheses (...). Python functions and methods contain their arguments (parameters) in tuples.