SyntaxFix
Write A Post
Hire A Developer
Questions
outfile.write(infile.read()) # time: 2.1085190773010254s shutil.copyfileobj(fd, wfd, 1024*1024*10) # time: 0.60599684715271s
A simple benchmark shows that the shutil performs better.