- Programming is fun again!
- Free (as in beer and as in speech)
- Steep learning curve
- Highly readable, easy to code
- Batteries included
- Package management
- Scales pretty well (ie. namespaces, proper OO)
- Indexing starts at
0
, not1
. Look:
- you only do throw-away scripts
- you need to build GUIs to interact (but don't need to deploy them)
- you want print-ready graphs
- you do data analysis, and data analysis only
- you want code that scales well with your project
- you collaborate with others on the code
- you want parallel computing, Sockets, interface C, C++ or Fortran,
- you want to parse a string
- We'll need python, ipython, matplotlib, numpy, scipy and PIL (the python image library)
- For nerds:
- install python2.7
- install pip (
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
) - using pip, install the other stuff (ie.
pip install matplotlib
)
- Alternative distributions (haven't used any of them):
- Spyeder
- Enthought Python
- Sage (Supports symbolic computation, not 100% python compatible though)
- Python(x,y), Windows only
- At any rate, we can the interactive ipython console with
ipython qtconsole --pylab inline
- I we feel fancy, we'll run the console in the browser:
ipython notebook --pylab inline
Why?- Everything you do is saved automatically.
- Start it from a folder in your dropbox and you have the same environment on all your machines
- You can even tell your code cells to be just Markdown-Formatted text-cells. This way you can annotate your code, log results, etc. A proper lab book!
- Numpy for Matlab Users
- Cheat Sheet for Matlab and R users
- The Excellent SciPy Lectures
- Some interesting matplotlib recipes