Skip to content

Commit b483519

Browse files
authored
Merge pull request #871 from martinRenou/add_colab
Added Colab support
2 parents 65a8761 + 1b4a36c commit b483519

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ipyleaflet/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Distributed under the terms of the Modified BSD License.
33
#
44

5+
import sys
56
from ._version import version_info, __version__ # noqa
67

78
# Allow dependencies to ipyleaflet to not be installed upon post-link for
@@ -10,6 +11,11 @@
1011
try:
1112
from .leaflet import * # noqa
1213
from .basemaps import basemaps # noqa
14+
15+
if "google.colab" in sys.modules:
16+
from google.colab import output
17+
18+
output.enable_custom_widget_manager()
1319
except ImportError:
1420
pass
1521

0 commit comments

Comments
 (0)