IPython notebook

I’ve recently started making more use of the IPython notebook mode to run simple calculations. It effectively adds the behavior you get from a Mathematica notebook to ipython.

Suprisingly (in light of how cool it is), I couldn’t find too much use for it at first. I normally use ipython as a one-off scripting tool, and starting a notebook and popping open the web-browser for this kind of task was over the top. Fortunately for me, I found a simple change in my behavior has made for a much more effective tool.

I simply started keeping a notebook open all the time, and continuously updating it with my little experiments over the course of the day. (Yes, this should have been the obvious way to go about it in the first place.) Not only does this allow me to run my one-liners, it also lets me re-execute and copy-paste from previous work in the day trivially – something I’m really enjoying as I iterate on problems.

2 Replies to “IPython notebook”

  1. do you have examples of how you use it? i don’t really use ipython but anything that lets me keep track of experiments would be awesome.

    1. Sure – I just always have it running from my ipython directory (it keeps each notebook as a sub-directory from where it’s started – I like having them in one place):

      cd ~/ipython
      ipython notebook&
      disown %1

      Then it’s always running on localhost:8888 for me to pop into. Each worksheet runs in a separate process and retains the state between visits, which is nice if I have some preprocessing step that’s slow or whatever.

Leave a Reply

Your email address will not be published. Required fields are marked *