hm
BUG: was assuming we were in ipython shell