On Mon, Oct 30, 2006 at 08:21:20AM -0600, John Hunter wrote: > blocking calls in pylab with gtk threading may be possible but it is > beyond my powers. I would write this with a callback, eg create a > class that takes a callback in the constructor and calls the callback > after n clicks with a list of n coords.
Yes this is the right way of doing this (I have been experimenting a bit yesterday). However have a blocking call would be really nice for casual programmers, like so many physicists, who have no idea what eventloops and threads are. I think that for such a blocking call to work, all we would need is a way to start and stop the eventloop (I am talking in wx terms, the only GUI toolkit I know). That way when a script call ginput the ginput call adds a few callbacks to the canvas (that's the easy part) and starts the eventloop. The callbacks stop the eventloop when the right number of points as been acquired. Now I have no clue if this is possible, but that would certainly make writing small interactive scripts much easier. Cheers, Gaƫl ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel