[IPython-dev] Link widget
sylvain.corlay at gmail.com
Thu Mar 13 00:11:43 EDT 2014
I think this is great. Exactly what we needed for certain performance
issues we encountered.
On Wed, Mar 12, 2014 at 10:46 PM, Jason Grout
<jason-sage at creativetrax.com>wrote:
> Hi all,
> I was working on the next level of optimizations for linking widgets
> together, and came up with a Link widget that links widget values
> http://sagecell.sagemath.org/?q=bhlnao 
> Notice that the first two sliders are lockstep with each other (they are
> linked with the Link widget), but the third slider has a delay because
> it necessitates a roundtrip to python.
> Code is in my ipywidgets repository at
> The Link widget still has some things to fix (like unregistering if it
> is destroyed or explicitly unbound, testing to make sure changing the
> list of bindings has the right effect, etc.), but do you think it is
> valuable enough of an idea to include in the standard widget set?
>  Code at the link is:
> from IPython.html import widgets
> a = widgets.FloatSliderWidget(value=30)
> b = widgets.FloatSliderWidget()
> c = widgets.FloatSliderWidget()
> from IPython.utils.traitlets import link
> python_link = link([a,'value'], [c, 'value'])
> print "Notice the delay in the third slider from the roundtrip to python."
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev