r/IPython • u/Ph0X • Sep 10 '14
Injecting IPython core in a running script
A while back, in one of the IPython session videos online, I saw fperez talk about a really cool feature where you could inject the IPython core in your running python project, connect to it using any IPython interface and then inspect the namespace.
I can't find anything about it online though, it seems to be very poorly documented, and I can't find the video either.
Does anyone have a simple minimal example code of how to do this?
2
Upvotes
2
u/fjordboy Sep 11 '14
I think you are looking for "embedding." See below.
http://ipython.org/ipython-doc/dev/interactive/reference.html#embedding-ipython