Hi Gaël,

I mostly work in an interactive shell (ipython), and if I simply call
a blocking function (like raw_input)
from the prompt, it also blocks the event loop of the matplotlib gui backend
(it happens for GtkAgg, but not for TKAgg. I'm not sure with other
backends, but I thought
TKAgg is a special case.)
So I wanted to call a raw_input (or other blocking function) in an
interactive shell
without freezing the figure.

Hmm, maybe I'm missing something and there has been an very easy way to do it.
My understading was that the gui event loop waits (without processing
gui events)
until the commands entered in the prompt finish.

-JJ





On Mon, Mar 10, 2008 at 7:45 PM, Gael Varoquaux
<[EMAIL PROTECTED]> wrote:
> On Mon, Mar 10, 2008 at 07:09:03PM -0400, Jae-Joon Lee wrote:
>
> > I often need to take an input from other sources
>  > (I mean, other than matplotlib itself, e.g., raw_input).
>  > I don't think running a blocking function, such as a raw_input,
>  > without freezing the figure canvas
>  > has been easy in matplotlib (especially when you're in an interactive
>  > mode).
>
>
> Hum, I am not sure what is the added value to simply spawning a thread
>  and running the blocking function in the thread. The reason I say this is
>  that ginput is a hack, and a fragile one. The reason behind ginput is
>  that we want to block the call threading while not blocking the GUI event
>  loop. Can you please detail your usecase, I am afraid I am missing
>  something here.
>
>  Cheers,
>
>  Gaël
>
>  PS: And welcome on the matplotlib-devel list.
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  Matplotlib-devel mailing list
>  Matplotlib-devel@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to