import shutilshutil.rmtree('/folder_name')标准库参考:shutil.rmtree。
根据设计,
rmtree在包含只读文件的文件夹树上失败。如果要删除该文件夹而不管它是否包含只读文件,请使用
shutil.rmtree('/folder_name', ignore_errors=True)
import shutilshutil.rmtree('/folder_name')标准库参考:shutil.rmtree。
根据设计,
rmtree在包含只读文件的文件夹树上失败。如果要删除该文件夹而不管它是否包含只读文件,请使用
shutil.rmtree('/folder_name', ignore_errors=True)