Thanks to visit codestin.com Credit goes to github.com
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 e718e08 commit 2b49bedCopy full SHA for 2b49bed
plotly/widgets/graph_widget.py
@@ -9,14 +9,15 @@
9
from IPython.display import Javascript, display
10
11
from plotly import utils
12
+from pkg_resources import resource_string
13
14
# Load JS widget code
15
# No officially recommended way to do this in any other way
16
# http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html
17
directory = os.path.dirname(os.path.realpath(__file__))
18
js_widget_file = os.path.join(directory, 'graphWidget.js')
-with open(js_widget_file) as f:
19
- js_widget_code = f.read()
+js_widget_code = resource_string('plotly',
20
+ 'widgets/graphWidgets.js').decode('utf-8')
21
22
display(Javascript(js_widget_code))
23
0 commit comments