19 Jun 2012, 00:18

iPython Notebook

My mentor at IBM turned me on to using the Notebook feature of iPython. This is really cool!

Now, the Python CLI does its job. I have been using it for a while for testing modules and code ideas but usually need documentation open when trying out a new module or I need to look over my own code when I have forgotten what the names in my library are.

iPython is interactive (hence “i”). Via the command line you can use tab completion to quickly finish what you were typing or to see what is available from the module or class. Also, iPython allows you to do basic procedures that I usually find myself exiting the shell for…listing a directory, removing a file, changing the working directory, etc. This is cool, but it gets better.

Using the Notebook feature will allow you to access iPython via a web page. It supports tab completion but does it in a very nice way – drop down lists wherever you are at in a line and it completes code, lists available methods, and completes directory/filenames as well.

After doing a lot of testing and research in the web console, you can save your Notebook so you can pick up where you left off later or just print it for reference. Also check out the graphing abilities with MatPlotLib…graphs show up inline!