[IPython-dev] Best way to detect IPython notebook
tarun.gaba7 at gmail.com
Thu Feb 20 11:45:33 EST 2014
I have written a method, which behaves differently when called from IPython
notebook, and from interpreter/qtconsole respectively.
I need to detect whether the method is called from notebook or interpreter.
This was the code I was using till now.
if get_ipython().config['KernelApp']['parent_appname'] ==
But I have came to know that this particular dict changes its format in
different IPython versions(I am not sure how many changes are there).
Is there any better method to achieve this?
Thanks in advance :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev