how to close a file after using shutil.copyobj code example Example: python copy file from shutil import copyfile copyfile(src, dst)