We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45e6abc commit 4b98232Copy full SHA for 4b98232
plotly/widgets/graph_widget.py
@@ -9,14 +9,20 @@
9
10
11
# TODO: protected imports?
12
-import ipywidgets as widgets
13
-from traitlets import Unicode
+import Ipython
14
from IPython.display import Javascript, display
15
16
import plotly.plotly.plotly as py
17
from plotly import utils, tools
18
from plotly.graph_objs import Figure
19
+if Ipython.version_info[0] > 3:
20
+ import ipywidgets as widgets
21
+ from traitlets import Unicode
22
+else:
23
+ import IPython.widgets as widgets
24
+ from IPython.trailets import Unicode
25
+
26
# Load JS widget code
27
# No officially recommended way to do this in any other way
28
# http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html
0 commit comments