def copyfileobj(fsrc, fdst, callback, length=16 * 1024):
    copied = 0
while True:
    buf = fsrc.read(length)
if not buf:
    break
fdst.write(buf)
copied += len(buf)
callback(copied)
Get progress back from shutil file copy thread