<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 20 February 2014 08:45, TARUN GABA <span dir="ltr"><<a href="mailto:tarun.gaba7@gmail.com" target="_blank">tarun.gaba7@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>    if get_ipython().config['KernelApp']['parent_appname'] == 'ipython-notebook':</div>

</blockquote></div><br></div><div class="gmail_extra">Be aware that:<br></div><div class="gmail_extra">- This only tells you what started the kernel - you can start a kernel with the notebook and attach a Qt console to it, and there's no good way to tell which one has sent a piece of code.<br>

</div><div class="gmail_extra">- We want to get rid of that value eventually: <a href="https://github.com/ipython/ipython/pull/4980">https://github.com/ipython/ipython/pull/4980</a><br><br></div><div class="gmail_extra">
As Matthias mentioned, can you tell us a bit more about what it is that you're trying to do?<br>
<br></div><div class="gmail_extra">Thanks,<br>Thomas<br></div></div>