File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 # import IPython/Jupyter base widget and display utilities
2222 try : # IPython 4.x
2323 import ipywidgets
24+ IPY = 4
2425 except ImportError : # IPython 3.x / 2.x
26+ IPY = 32
2527 import warnings
2628 with warnings .catch_warnings ():
2729 ipy_deprecation_msg = "The `IPython.html` package" \
4244 pass
4345
4446 try : # IPython 4.x / 3.x
45- from ipywidgets import IntProgress , HBox , HTML
47+ if IPY == 32 :
48+ from IPython .html .widgets import IntProgress , HBox , HTML
49+ IPY = 3
50+ else :
51+ from ipywidgets import IntProgress , HBox , HTML
4652 except ImportError :
4753 try : # IPython 2.x
48- from ipywidgets import IntProgressWidget as IntProgress
49- from ipywidgets import ContainerWidget as HBox
50- from ipywidgets import HTML
54+ from IPython .html .widgets import IntProgressWidget as IntProgress
55+ from IPython .html .widgets import ContainerWidget as HBox
56+ from IPython .html .widgets import HTML
57+ IPY = 2
5158 except ImportError :
52- pass
59+ IPY = 0
5360
5461 try :
5562 from IPython .display import display # , clear_output
You can’t perform that action at this time.
0 commit comments