From: Steve C. <ste...@ya...> - 2005-01-26 04:16:53
|
Regarding Baptiste's patch - I'm not too keen on the idea of wrapping gtk.gdk.threads_enter() / gtk.gdk.threads_leave() around every GDK function call. - I share Fernando's concern with possible problems when adding new widgets or embedding a matplotlib window into something else. My understanding is that wrapping gtk.gdk.threads_enter() / gtk.gdk.threads_leave() around GDK functions is not necessary if all the GDK calls occur in the same thread. So I think a simpler solution is to arrange for all gui calls to go to a single thread and do away with enter()/leave(). I created a module that allows interactive matplotlib access from a python shell, its a modified version of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109 This method seems to work for me (on Linux) and is not very intrusive to matplotlib code - it just requires that 'gui_cmd()' is used to execute all gui commands when in interactive mode. Any comments? Regards Steve |