【问题标题】:Unable to Create ZIPfile using python无法使用 python 创建 ZIPfile
【发布时间】:2014-07-12 12:42:24
【问题描述】:

我正在尝试使用 python 3.4 创建 zipfile。 执行时显示以下错误:

AttributeError: 'module' object has no attribute 'Zipfile'

我的代码:

import zipfile

f= zipfile.Zipfile("testZIP.zip","w")

【问题讨论】:

    标签: python zipfile python-3.4


    【解决方案1】:

    它是zipfile.ZipFile,大写为F,而不是zipfile.Zipfile

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-29
      • 2020-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-13
      • 2015-05-11
      • 1970-01-01
      相关资源
      最近更新 更多