ToolTipHelper.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ToolTip-Helper 作者: doobleweb 项目源码 文件源码
def on_navigate(self, href):
        """ open the link in a new tab on web browser """
        if '$$$' in href:
            try:
                arr = href.split('$$$')
                file_name = arr[0].strip()
                location = arr[1].split(',')
                row = int(location[0].strip())
                col = int(location[1].strip())
                sublime.active_window().open_file("%s:%s:%s" % 
                        (file_name, row, col),
                        sublime.ENCODED_POSITION)
            except Exception as e:
                # print(e)
                self.logger_msg += str(e) + '\n'
        else:
            try:
                webbrowser.open_new_tab(href)
            except Exception as e:
                # logging.error('cannot open link on web browser.')
                self.logger_msg += str(e) + '\n'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号