In [2]:
from ipywidgets import *

In [3]:
IntSlider()

In [7]:
from IPython.display import display
w = IntSlider()
display(w)

In [5]:
display(w)

In [6]:
w.close() # close all of the widgets

In [22]:
display(w)

In [10]:
w.value # gets the current values


Out[10]:
32

In [11]:
w.value = 50 # sets the current value

In [12]:
w.keys # possible values that can be changed for the widgets


Out[12]:
['_view_name',
 'orientation',
 'color',
 '_view_module',
 'disabled',
 'visible',
 'readout_format',
 '_model_module',
 'font_style',
 'layout',
 'min',
 '_range',
 'background_color',
 'slider_color',
 'continuous_update',
 'font_family',
 '_dom_classes',
 'description',
 '_model_name',
 'max',
 'readout',
 'font_weight',
 'step',
 'font_size',
 'msg_throttle',
 'value']

In [14]:
Text(value='Hello World', disabled=True) # cannot be edited since disabled

In [16]:
# traitlet link function
from traitlets import link
a = FloatText()
b = FloatSlider()
display(a, b)
mylink = link((a, 'value'), (b, 'value'))
# the tuple here represents: (thing to link, trait of the thing to link)
# they can be unlinked using
# mylink.unlink()

In [32]:
print w.max


100

In [ ]: