You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
839 B

4 years ago
  1. """
  2. Shim to maintain backwards compatibility with old IPython.html imports.
  3. """
  4. # Copyright (c) IPython Development Team.
  5. # Distributed under the terms of the Modified BSD License.
  6. import sys
  7. from warnings import warn
  8. from IPython.utils.shimmodule import ShimModule, ShimWarning
  9. warn("The `IPython.html` package has been deprecated since IPython 4.0. "
  10. "You should import from `notebook` instead. "
  11. "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning)
  12. _widgets = sys.modules['IPython.html.widgets'] = ShimModule(
  13. src='IPython.html.widgets', mirror='ipywidgets')
  14. _html = ShimModule(
  15. src='IPython.html', mirror='notebook')
  16. # hook up widgets
  17. _html.widgets = _widgets
  18. sys.modules['IPython.html'] = _html
  19. if __name__ == '__main__':
  20. from notebook import notebookapp as app
  21. app.launch_new_instance()