[IPython-dev] Link widget
jason-sage at creativetrax.com
Wed Mar 12 22:46:52 EDT 2014
I was working on the next level of optimizations for linking widgets
together, and came up with a Link widget that links widget values
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."
More information about the IPython-dev