Until recently I had never been a fan of IPython but with their HTML notebook they’ve finally won me over. What I like about this tool is that it makes it easy to go back and forth between interactive prototyping and a script. Being able to continuously edit and re-run code in an interactive session is a powerful tool.
The notebook also makes a great tutorial and demo tool. Here’s a PDF of my session developing a Python replacement for IDL’s GAUSSFIT function.
Installation
The IPython notebook requires a few extra packages but if you have a setup like me it’s easy to get everything installed:
brew install zeromq pip install pyzmq pip install tornado pip install ipython
After doing this you may also want to locally install MathJax for JavaScript equation rendering:
from IPython.external.mathjax import install_mathjax install_mathjax()
To launch the notebook from whatever directory you want to work in:
ipython notebook
This will launch the IPython notebook dashboard in your default browser, from which you can make new notebooks or resume working on existing ones.
See the docs for all you can do with the notebook, and enjoy!