示例#1
0
文件: plugin.py 项目: wtheis/spyder
 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))
示例#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))
示例#3
0
文件: widgets.py 项目: quntion/spyder
    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)
示例#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)
示例#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)
示例#6
0
 def open_url():
     return programs.start_file(url)
示例#7
0
 def open_url():
     return programs.start_file(url)