prompt_open_recent_project.py 文件源码

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

项目:st-user-package 作者: math2001 项目源码 文件源码
def run(self):
        self.recent_workspaces = self.get_recent_workspaces()
        if not self.recent_workspaces:
            return sublime.error_message('No project to load!')

        for i, recent_workspace in enumerate(self.recent_workspaces):
            self.recent_workspaces[i] = recent_workspace.replace('C/', 'C:/').strip('/')


        # only display workspaces that really exist
        self.recent_workspaces_that_really_exist = []
        for recent_workspace in self.recent_workspaces:
            if os.path.isfile(recent_workspace):
                self.recent_workspaces_that_really_exist.append(recent_workspace)

        sublime.message_dialog(str(self.recent_workspaces_that_really_exist))
        self.window.show_quick_panel(self.recent_workspaces_that_really_exist, self.on_done)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号