Skip to content

Instantly share code, notes, and snippets.

@jsbain
Created February 18, 2015 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsbain/43b74fe87ad7cb0c6998 to your computer and use it in GitHub Desktop.
Save jsbain/43b74fe87ad7cb0c6998 to your computer and use it in GitHub Desktop.
world
class world (object):
def webview_should_start_load(self,webview, url, nav_type):
if url.startswith('world://'):
print 'country selected:', urlparse.unquote(urlparse.urlparse(url).netloc)
return False
else:
return True
import ui,os
w=ui.WebView()
w.delegate=world()
p=os.path.abspath('world/index.html')
w.load_url(p)
w.present('panel')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment