From: Steve C. <ste...@ya...> - 2005-01-26 09:47:05
|
On Wed, 2005-01-26 at 12:17 +0800, Steve Chaplin wrote: > 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. I may not have clearly explained my idea. I'm not proposing another Python shell/interpreter to run matplotlib. The mt.py module is to test an idea without needing to modify any matplotlib code. To use it as intended would involve moving it into matplotlib and getting matplotlib to call gui_cmd() to execute interactive gtk/gdk calls in their own thread. This is the part I'm not sure about - what is the minimal set of functions to wrap with gui_cmd() to ensure that it encloses all gtk/gdk functions? gui_cmd() could be called from draw_if_interactive() and maybe new_figure_manager(), I'm not sure where else it might be needed. Also it would need to be fed import commands. Steve |