使用Python无法创建ZIP文件

6
我正在尝试使用Python 3.4创建zip文件。 执行时会出现以下错误:
AttributeError: 'module' object has no attribute 'Zipfile'

我的代码:

import zipfile

f= zipfile.Zipfile("testZIP.zip","w")
1个回答

20

在 IT 技术中,zipfile.ZipFile 的首字母应该大写,不应该是 zipfile.Zipfile


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接