1.shutil模块 shutil模块是对os模块的功能补充,包含移动.复制.打包.压缩.解压等功能. 1)shutil.copyfileobj() 复制文件内容到另一个文件,可指定大小内容,如length=16*1024. import shutil f_old = open('old_file','r') f_new = open('new_file','w') shutil.copyfileobj(f_old,f_new,length=*) 2)shutil.copyfile() 同样将文…