open_pygame_doc.py 文件源码

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

项目:st-user-package 作者: math2001 项目源码 文件源码
def run(self, edit, *args, **kwargs):
        self.window = self.view.window()
        self.selection = sublime.Selection(self.view.id())
        self.settings = self.view.settings()

        for region in self.view.sel():

            # pygame.draw.circle

            text = self.view.substr(region)
            text = 'pygame.draw.circle'
            if text.startswith('pygame.'):
                text = text[len('pygame.'):]

            module, method = text.split('.')

            path = PATH_TO_PYGAME_DOC + '/' + module + '.html#' + module + '.' + method

            webbrowser.open_new_tab(path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号