On Tue, Feb 05, 2008 at 07:16:59PM -0500, Paul Kienzle wrote:
> How about giving flush_events() an until=condition and timeout=n keywords 
> so that flush_events becomes:

>         if timeout > 0: set timer event which triggers out_of_time
>       while get next event:
>            process event
>            if out_of_time or until(): break

I'd say this is exactly the way to do it. The problem is that under GTK
is seems fairly easy to do, under Tk it seems feasible, but under Qt and
under Wx I have no clue how to do this. We can always fallback to
busy-waiting for these toolkits.

This indeed seems to be the way to go. Maybe I would empty the event
stack when the "until()" condition is met, before returning to the
caller, and thus blocking again.

> I'll look around some more and see if I can find the sleep until next
> event function in wx.

Yeah, sleep, I need more of that. Or maybe you can find wx.coffee ?

Cheers,

Gaƫl

-------------------------------------------------------------------------
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