使用 Python zipfile 模块删除 zip 文件中的文件夹 [英] Deleting a folder in a zip file using the Python zipfile module
本文介绍了使用 Python zipfile 模块删除 zip 文件中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用 Python 中的 ZipFile 模块从文件内部删除文件夹?
Is it possible to delete a folder from inside a file using the ZipFile module in Python?
推荐答案
没有.读出存档的其余部分并将其写入一个新的 zip 文件.
No. Read out the rest of the archive and write it to a new zip file.
这篇关于使用 Python zipfile 模块删除 zip 文件中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文