On Thu, Jun 19, 2008 at 2:30 PM, Daniel Ashbrook <[EMAIL PROTECTED]> wrote:
> John Hunter wrote:
>>
>> Use the gtk mainloop and do your figure updates in a timeout add or a
>> idle handler (as suggested in the animation tutorial at
>> http://www.scipy.org/Cookbook/Matplotlib/Animations
>
> Excellent, thanks. Your sample code adapted nicely; appended below for
> posterity.

I don't think this is what you want.  gtk is already threaded.  By
doing things in the gtk mainloop, you are using their threading.  You
are asking for a world of pain if you try and mix in python threading
unless you really know what you are doing.  The point of the example
is that you don't need to use python threads.  All your printing and
figure updating can be done in function calls activated by the gtk
loop.

JDH

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to