Fixes issue #410 , IPython.core.ipapi deprecated
Merge pull request #417 from ddale/issue410

Fixes issue #410 , IPython.core.ipapi deprecated