Updated for ipython 1.1