Updated for IPython 2.0