python快捷解决beyond compare应用程序发生错误

beyond compare是一个代码对比工具,非常实用,但经常有应用程序错误的情况。

根据网上的解决方法是删除目录下的所有文件
系统盘:\用户[用户名]\AppData\Roaming\Scooter Software\Beyond Compare 3

import os
import shutil
import traceback
import getpass

cur_path = r'C:\Users\\'+getpass.getuser()+r'\AppData\Roaming\Scooter Software\Beyond Compare 3'
print(cur_path)
try:
	shutil.rmtree(cur_path)
	print("success!")
except Exception as e:
	traceback.print_exc()

os.system('pause')
posted @ 2020-03-03 08:31  Eash、  阅读(450)  评论(0编辑  收藏  举报