我想解压缩位于不同路径的不同目录中的文件。并且代码如下,并且错误是无效的数据流。请帮帮我。太感谢了。import sysimport osimport bz2from bz2 import decompresspath = "Dir"for(dirpath,dirnames,files)in os.walk(path): for file in files: filepath = os.path.join(dirpath,filename) newfile = bz2.decompress(file) newfilepath = os.path.join(dirpath,newfile)
添加回答
举报
0/150
提交
取消