Skip to content

Commit 1905adc

Browse files
committed
update widgets imports
use ipywidgets
1 parent 4e090af commit 1905adc

26 files changed

+36
-36
lines changed

examples/Customization/appconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
from IPython.config.configurable import Configurable
3434
from IPython.config.application import Application
35-
from IPython.utils.traitlets import (
35+
from traitlets import (
3636
Bool, Unicode, Int, List, Dict
3737
)
3838

examples/Interactive Widgets/Beat Frequencies.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444
],
4545
"source": [
46-
"from IPython.html.widgets import interactive\n",
46+
"from ipywidgets import interactive\n",
4747
"from IPython.display import Audio, display\n",
4848
"import numpy as np"
4949
]

examples/Interactive Widgets/Custom Widget - Hello World.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
},
110110
"outputs": [],
111111
"source": [
112-
"from IPython.html import widgets\n",
113-
"from IPython.utils.traitlets import Unicode\n",
112+
"import ipywidgets as widgets\n",
113+
"from traitlets import Unicode\n",
114114
"\n",
115115
"class HelloWidget(widgets.DOMWidget):\n",
116116
" _view_name = Unicode('HelloView', sync=True)"
@@ -570,7 +570,7 @@
570570
},
571571
"outputs": [],
572572
"source": [
573-
"from IPython.utils.traitlets import CInt\n",
573+
"from traitlets import CInt\n",
574574
"class SpinnerWidget(widgets.DOMWidget):\n",
575575
" _view_name = Unicode('SpinnerView', sync=True)\n",
576576
" value = CInt(0, sync=True)"
@@ -757,7 +757,7 @@
757757
"w2 = widgets.IntSlider()\n",
758758
"display(w1,w2)\n",
759759
"\n",
760-
"from IPython.utils.traitlets import link\n",
760+
"from traitlets import link\n",
761761
"mylink = link((w1, 'value'), (w2, 'value'))"
762762
]
763763
},

examples/Interactive Widgets/Date Picker Widget.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"source": [
2323
"from __future__ import print_function # For py 2.7 compat\n",
2424
"\n",
25-
"from IPython.html import widgets # Widget definitions\n",
25+
"import ipywidgets as widgets # Widget definitions\n",
2626
"from IPython.display import display # Used to display widgets in the notebook\n",
27-
"from IPython.utils.traitlets import Unicode # Used to declare attributes of our widget"
27+
"from traitlets import Unicode # Used to declare attributes of our widget"
2828
]
2929
},
3030
{

examples/Interactive Widgets/Exploring Graphs.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
],
3232
"source": [
33-
"from IPython.html.widgets import interact"
33+
"from ipywidgets import interact"
3434
]
3535
},
3636
{

examples/Interactive Widgets/Export As (nbconvert).ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"outputs": [],
1010
"source": [
1111
"# Widget related imports\n",
12-
"from IPython.html import widgets\n",
12+
"import ipywidgets as widgets\n",
1313
"from IPython.display import display, clear_output, Javascript\n",
14-
"from IPython.utils.traitlets import Unicode\n",
14+
"from traitlets import Unicode\n",
1515
"\n",
1616
"# nbconvert related imports\n",
1717
"from IPython.nbconvert import get_export_names, export_by_name\n",

examples/Interactive Widgets/Factoring.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"outputs": [],
2424
"source": [
25-
"from IPython.html.widgets import interact\n",
25+
"from ipywidgets import interact\n",
2626
"from IPython.display import display"
2727
]
2828
},

examples/Interactive Widgets/File Upload Widget.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"source": [
1111
"import base64\n",
1212
"from __future__ import print_function # py 2.7 compat.\n",
13-
"from IPython.html import widgets # Widget definitions.\n",
14-
"from IPython.utils.traitlets import Unicode # Traitlet needed to add synced attributes to the widget."
13+
"import ipywidgets as widgets # Widget definitions.\n",
14+
"from traitlets import Unicode # Traitlet needed to add synced attributes to the widget."
1515
]
1616
},
1717
{

examples/Interactive Widgets/Image Browser.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"outputs": [],
3636
"source": [
37-
"from IPython.html.widgets import interact"
37+
"from ipywidgets import interact"
3838
]
3939
},
4040
{

examples/Interactive Widgets/Image Processing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"outputs": [],
2424
"source": [
25-
"from IPython.html.widgets import interact, interactive, fixed\n",
25+
"from ipywidgets import interact, interactive, fixed\n",
2626
"from IPython.display import display"
2727
]
2828
},

0 commit comments

Comments
 (0)