Hmm, I think I can solve my problem in a much easier way. I can create first a QtGui.QApplication and if I get a runtime error then I assume that the Qt event loop has started from the ipython console otherwise I continue as is. Sorry, for the trouble.<div>
<br></div><div>Best,</div><div>Eleftherios</div><div><br><div class="gmail_quote">On Wed, Oct 24, 2012 at 4:52 PM, Eleftherios Garyfallidis <span dir="ltr"><<a href="mailto:garyfallidis@gmail.com" target="_blank">garyfallidis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div class="im">On Wed, Oct 24, 2012 at 4:07 PM, Thomas Kluyver <span dir="ltr"><<a href="mailto:takowl@gmail.com" target="_blank">takowl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 24 October 2012 14:55, Matthias BUSSONNIER<br>
<div><<a href="mailto:bussonniermatthias@gmail.com" target="_blank">bussonniermatthias@gmail.com</a>> wrote:<br>
> I am especially interested to know if --gui=qt is used.<br>
><br>
><br>
> Script are run in the kernel that has no notion of what frontend it is<br>
> attached to.<br>
<br>
</div>Isn't the --gui option for the kernel to integrate with event loops,<br>
though? So it should be possible to see it.<br></blockquote><div><br></div></div><div>Yes, --gui is for event loops as you suggest. </div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You can check if IPython is loaded by looking in sys.modules, or<br>
looking for get_ipython in the builtins. I'm not sure if there's a<br>
good way to check if you're called from user code in IPython<br>
(inspecting the stack probably isn't a good way).<br>
<br></blockquote></div><div>Thank you Thomas will give it a go.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thomas<br>
_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</blockquote></div></div><br>
</blockquote></div><br></div>