小编woo*_*kie的帖子

为什么python不能使用zip方法解压缩winrar创建的密码保护的zip文件?

我在网上搜索得很高,但仍无法找到解决上述问题的方法.有没有人知道为什么以及如果可以这样做?

psw="dg"

ZipFile.extractall("data.zip", None, psw)
Run Code Online (Sandbox Code Playgroud)

我得到的错误:

TypeError: unbound method extractall() must be called
with ZipFile instance as first argument (got str instance instead)
Run Code Online (Sandbox Code Playgroud)

python zip zipfile

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

python ×1

zip ×1

zipfile ×1