SideBar.py 文件源码

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

项目:.sublime 作者: cxdongjack 项目源码 文件源码
def remove_safe_file(self, path):
        if not SideBarSelection().isNone(path):
            try:
                os.remove(path)
            except:
                try:
                    if not os.access(path, os.W_OK):
                        import stat
                        os.chmod(path, stat.S_IWUSR)
                    os.remove(path)
                except:
                    # raise error in case we were unable to delete.
                    if os.path.exists(path):
                        print("Unable to remove file:\n"+path)
                        os.remove(path)
        else:
            print('path is none')
            print(path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号