>>>>> "Gael" == Gael Varoquaux <[EMAIL PROTECTED]> writes:

    Gael> 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.

    Gael> Yes this is the right way of doing this (I have been
    Gael> experimenting a bit yesterday). However have a blocking call
    Gael> would be really nice for casual programmers, like so many
    Gael> physicists, who have no idea what eventloops and threads
    Gael> are.

    Gael> I think that for such a blocking call to work, all we would
    Gael> need is a way to start and stop the eventloop (I am talking
    Gael> in wx terms, the only GUI toolkit I know). That way when a
    Gael> script call ginput the ginput call adds a few callbacks to
    Gael> the canvas (that's the easy part) and starts the
    Gael> eventloop. The callbacks stop the eventloop when the right
    Gael> number of points as been acquired.

    Gael> Now I have no clue if this is possible, but that would
    Gael> certainly make writing small interactive scripts much
    Gael> easier.

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.

JDH

-------------------------------------------------------------------------
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

Reply via email to