def on_navigate(self, url): if url.startswith('http://') or url.startswith('https://'): webbrowser.open_new_tab(url) else: self.window.open_file(url)