All Unkept
Posted in: Python  —  May 06, 2010 at 11:41 PM

Exploratory programming with IPython

by Luke Plant

So, IPython rocks. But what if you want to use it deep inside a program to do a bit of exploratory programming with access to the full program state etc.? Just stick these two lines of code into the place you want to start off from:

from IPython.Shell import IPShellEmbed
IPShellEmbed([])()

More info on IPShellEmbed here.

I just discovered this, and it is unbelievably useful in some situations!

Comments §

blog comments powered by Disqus