Nadia pursued blocking calls for a while and I think she made some
progress. You are right about this model fitting the brain of
physicists better than a callback approach. Maybe Nadia can bring us
up to speed on where she left off.
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
> 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