[IPython-dev] IPython event loop integration

Min RK benjaminrk at gmail.com
Wed Aug 13 12:02:26 EDT 2014


Tornado's PeriodicCallback ought to be the way to go for timers in an IPython kernel. There may be some issues if matplotlib is involved, setting up its own eventloop. In that case, you may want to use matplotlib's own Timer objects. An advantage of mpl timer objects is that they will work in all sorts of cases, not just tornado-based IPython.

-MinRK

> On Aug 12, 2014, at 9:36, Thomas Kluyver <takowl at gmail.com> wrote:
> 
> Hi Cyrille,
> 
> Having a quick scan through the thread you linked to, I wonder if it's possible to use the kernel event loop to schedule update events. pyzmq subclasses tornado's event loop, and provides a DelayedCallback class [1], and tornado itself has a PeriodicCallback class [2].
> 
> [1] http://zeromq.github.io/pyzmq/api/generated/zmq.eventloop.ioloop.html#delayedcallback
> [2] http://tornado.readthedocs.org/en/latest/ioloop.html#tornado.ioloop.PeriodicCallback
> 
> Thomas
> 
> 
>> On 11 August 2014 21:16, Cyrille Rossant <cyrille.rossant at gmail.com> wrote:
>> Hi all,
>> 
>> We're currently implementing an IPython notebook backend for Vispy.
>> We're having a hard time figuring out how to integrate timer-based
>> animations in the notebook [1]. We'd really appreciate if one of you
>> could have a look at our problem. This is the last step of our GSoC
>> student's project, which terminates in a few days.
>> 
>> Many thanks,
>> Cyrille
>> 
>> [1] https://groups.google.com/forum/#!topic/vispy-dev/blh2odeMgvI
>> 
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140813/916e8c32/attachment.html>


More information about the IPython-dev mailing list