<br><br><div class="gmail_quote">On Sun, Jul 25, 2010 at 1:35 PM, Gael Varoquaux <span dir="ltr"><<a href="mailto:gael.varoquaux@normalesup.org">gael.varoquaux@normalesup.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Jul 25, 2010 at 12:10:12PM -0700, Brian Granger wrote:<br>
>    * It is not sufficient to call the  relevant function methods in the<br>
>    GUI toolkits (like ``IsMainLoopRunning``)  because those don't know<br>
>    if the GUI event loop is running through the  input hook.<br>
<br>
</div>OK, so this is the key part that I had missed. I could even call this a<br>
bug of the various toolkits.<br>
<br>
Is there any way to find out if the GUI event loop is running through<br>
the input hook at all?<br></blockquote><div><br></div><div>Yes:</div><div><br></div><div>from IPython.lib import inputhook</div><div>inputhook.current_gui()</div><div><br></div><div>The possible values are:</div><div><br>
</div><div><span class="Apple-style-span" style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 11px; line-height: 14px; "><pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal Monaco, 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; line-height: 1.4em; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; ">
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="line-height: normal; white-space: normal; font-size: small;">GUI_WX = 'wx'<br>GUI_QT = 'qt'<br>GUI_QT4 = 'qt4'<br>GUI_GTK = 'gtk'</span></font><br>
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="line-height: normal; white-space: normal; font-size: small;">GUI_TK = 'tk'</span></font><br><div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="line-height: normal; white-space: normal; font-size: small;"><font class="Apple-style-span" color="#DD1144" face="'Bitstream Vera Sans Mono', Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 16px; white-space: pre;"><br>
</span></font></span></font></div></pre></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
>    Both matplotlib and ets have code that tries to [snip]<br>
<br>
The problem is a bit larger: it's not only about matplotlib, ets and<br>
IPython, it's a fairly general practice for plugin-like code to check if<br>
the eventloop is running before starting it.<br>
<br></blockquote><div><br></div><div>Yes, and if such projects want to run in IPython, they are going to have to add additional logic.  We spent a very long time to see if this could be avoided and it cannot.  Our hope is that the additional logic can be absolutely minimal.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So, we have a problem and no solution (yet). The good news (I guess) is<br>
that IPython 0.11 is not in production yet. I am just worried about the<br>
bug reports landing in the various packages.<br></blockquote><div><br></div><div>Yes, this stuff is definitely not release ready. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Thanks for your explanations. If you have any suggestions, I am open to<br>
try things out in Mayavi (which apart for this problem works just fine<br>
with 0.11).<br>
<br></blockquote><div><br></div><div>Great.  I think we will need to wait until we have done the GUI integration for the kernel/frontend before finalizing things, because there, the GUI integration will be quite different.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Brian</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Gaël<br>
</blockquote></div><br><br clear="all"><br>-- <br>Brian E. Granger, Ph.D.<br>Assistant Professor of Physics<br>Cal Poly State University, San Luis Obispo<br><a href="mailto:bgranger@calpoly.edu">bgranger@calpoly.edu</a><br>
<a href="mailto:ellisonbg@gmail.com">ellisonbg@gmail.com</a><br>