##// END OF EJS Templates
And ipython_widgets became ipywidgets
Thomas Kluyver -
Show More
@@ -1,28 +1,28 b''
1 """
1 """
2 Shim to maintain backwards compatibility with old IPython.html imports.
2 Shim to maintain backwards compatibility with old IPython.html imports.
3 """
3 """
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 import sys
7 import sys
8 from warnings import warn
8 from warnings import warn
9
9
10 warn("The `IPython.html` package has been deprecated. "
10 warn("The `IPython.html` package has been deprecated. "
11 "You should import from `notebook` instead. "
11 "You should import from `notebook` instead. "
12 "`IPython.html.widgets` has moved to `ipython_widgets`.")
12 "`IPython.html.widgets` has moved to `ipywidgets`.")
13
13
14 from IPython.utils.shimmodule import ShimModule
14 from IPython.utils.shimmodule import ShimModule
15
15
16 _widgets = sys.modules['IPython.html.widgets'] = ShimModule(
16 _widgets = sys.modules['IPython.html.widgets'] = ShimModule(
17 src='IPython.html.widgets', mirror='ipython_widgets')
17 src='IPython.html.widgets', mirror='ipywidgets')
18
18
19 _html = ShimModule(
19 _html = ShimModule(
20 src='IPython.html', mirror='notebook')
20 src='IPython.html', mirror='notebook')
21
21
22 # hook up widgets
22 # hook up widgets
23 _html.widgets = _widgets
23 _html.widgets = _widgets
24 sys.modules['IPython.html'] = _html
24 sys.modules['IPython.html'] = _html
25
25
26 if __name__ == '__main__':
26 if __name__ == '__main__':
27 from notebook import notebookapp as app
27 from notebook import notebookapp as app
28 app.launch_new_instance()
28 app.launch_new_instance()
General Comments 0
You need to be logged in to leave comments. Login now