Skip to content

Commit

Permalink
Merge pull request #6 from ocefpaf/py3k_fix
Browse files Browse the repository at this point in the history
py3k_fix import fix.
  • Loading branch information
ellisonbg committed Oct 20, 2014
2 parents 0e308b2 + aa78259 commit 939e7be
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions leafletwidget/notebook.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from __future__ import print_function

import os
from urlparse import urljoin
try:
from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin

from IPython.display import display, HTML, Javascript

Expand All @@ -26,16 +29,16 @@ def display_css(url):

def initialize_notebook(leaflet_url=leaflet_url, leaflet_draw_url=leaflet_draw_url):
"""Initialize the JavaScript for this widget.
When called as::
initialize_notebook()
an internet connection is required.
To run without an internet connection, run the script `install-nbextension.py` in
the source tree of this project and then call::
initialize_notebook(leaflet_url='/nbextensions/leaflet-0.7.2',
leaflet_draw_url='/nbextensions/leaflet.draw/0.2.3')
Expand Down

0 comments on commit 939e7be

Please sign in to comment.