Windowsで実行している場合、Pythonのコピーバッファサイズが小さすぎる可能性があります:https://stackoverflow.com/a/28584857/679240
これに似たものを実装する必要があります(警告:テストされていません):
def copyfile_largebuffer(src, dst, length=16*1024*1024):
with open(newfile, 'wb') as outfile, open(oldfile, 'rb') as infile:
copyfileobj_largebuffer(infile, outfile, length=length)
def copyfileobj_largebuffer(fsrc, fdst, length=16*1024*1024):
while 1:
buf = fsrc.read(length)
if not buf:
break
fdst.write(buf)
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加