我对蟒蛇很陌生。我正在试图解压缩当前脚本目录中的一个文件,但我无法完成这项工作.
zip = zipfile.ZipFile(os.getcwd() + '/Sample_APE_File.zip')
zip.extractall(os.getcwd())错误:AttributeError: 'str' object has no attribute 'getcwd'
发布于 2014-03-14 17:24:25
如果将字符串值分配给os,则不再绑定到模块:
os = 'some string'把它重命名为别的东西。
https://stackoverflow.com/questions/22411770
复制相似问题