|
9 | 9 | import pathlib |
10 | 10 | import uuid |
11 | 11 |
|
| 12 | +from ipykernel.comm import Comm |
12 | 13 | from IPython.display import display, Javascript, HTML |
13 | | -try: |
14 | | - # Jupyter/IPython 4.x or later |
15 | | - from ipykernel.comm import Comm |
16 | | -except ImportError: |
17 | | - # Jupyter/IPython 3.x or earlier |
18 | | - from IPython.kernel.comm import Comm |
19 | 14 |
|
20 | 15 | from matplotlib import is_interactive |
21 | 16 | from matplotlib._pylab_helpers import Gcf |
@@ -44,18 +39,13 @@ def connection_info(): |
44 | 39 | return '\n'.join(result) |
45 | 40 |
|
46 | 41 |
|
47 | | -# Note: Version 3.2 and 4.x icons |
48 | | -# https://fontawesome.com/v3.2/icons/ |
49 | | -# https://fontawesome.com/v4.7/icons/ |
50 | | -# the `fa fa-xxx` part targets font-awesome 4, (IPython 3.x) |
51 | | -# the icon-xxx targets font awesome 3.21 (IPython 2.x) |
52 | | -_FONT_AWESOME_CLASSES = { |
53 | | - 'home': 'fa fa-home icon-home', |
54 | | - 'back': 'fa fa-arrow-left icon-arrow-left', |
55 | | - 'forward': 'fa fa-arrow-right icon-arrow-right', |
56 | | - 'zoom_to_rect': 'fa fa-square-o icon-check-empty', |
57 | | - 'move': 'fa fa-arrows icon-move', |
58 | | - 'download': 'fa fa-floppy-o icon-save', |
| 42 | +_FONT_AWESOME_CLASSES = { # font-awesome 4 names |
| 43 | + 'home': 'fa fa-home', |
| 44 | + 'back': 'fa fa-arrow-left', |
| 45 | + 'forward': 'fa fa-arrow-right', |
| 46 | + 'zoom_to_rect': 'fa fa-square-o', |
| 47 | + 'move': 'fa fa-arrows', |
| 48 | + 'download': 'fa fa-floppy-o', |
59 | 49 | None: None |
60 | 50 | } |
61 | 51 |
|
|
0 commit comments