Example #1
0
 def handle_link_clicks(self, url):
     url = to_text_string(url.toString())
     if url == "spy://tutorial":
         self.show_tutorial()
     elif url.startswith('http'):
         programs.start_file(url)
     else:
         self.rich_text.webview.load(QUrl(url))
Example #2
0
 def handle_link_clicks(self, url):
     url = to_text_string(url.toString())
     if url == "spy://tutorial":
         self.show_tutorial()
     elif url.startswith('http'):
         programs.start_file(url)
     else:
         self.rich_text.webview.load(QUrl(url))
Example #3
0
    def handle_link_clicks(self, url):
        """
        Handle how url links should be opened.

        Parameters
        ----------
        url: QUrl
            QUrl object containing the link to open.
        """
        url = to_text_string(url.toString())
        if url == "spy://tutorial":
            self.show_tutorial()
        elif url.startswith('http'):
            programs.start_file(url)
        else:
            self.rich_text.load_url(url)
Example #4
0
 def open_outside_spyder(self, fnames):
     """Open file outside Spyder with the appropriate application
     If this does not work, opening unknown file in Spyder, as text file"""
     for path in sorted(fnames):
         path = file_uri(path)
         ok = programs.start_file(path)
         if not ok:
             self.parent_widget.edit.emit(path)
Example #5
0
 def open_outside_spyder(self, fnames):
     """Open file outside Spyder with the appropriate application
     If this does not work, opening unknown file in Spyder, as text file"""
     for path in sorted(fnames):
         path = file_uri(path)
         ok = programs.start_file(path)
         if not ok:
             self.parent_widget.edit.emit(path)
Example #6
0
 def open_url():
     return programs.start_file(url)
Example #7
0
 def open_url():
     return programs.start_file(url)