In [ ]:
from IPython.html import widgets
from IPython.utils.traitlets import link
from IPython.display import display
List of widgets:
In [2]:
dir(widgets)
Out[2]:
Display and link the values of two widgets. You can use the link method in the traitlets namespace. Syntax `link((widget1, 'value'), (widget2, 'value'))
In [ ]:
Solution:
In [3]:
# %load sln/1.py
from IPython.html import widgets
from IPython.utils.traitlets import link
from IPython.display import display
slider = widgets.FloatSlider()
text = widgets.FloatText()
widgetlink = link((slider, 'value'), (text, 'value'))
display(slider, text)
In [ ]: