February 2006
Intermediate to advanced
648 pages
14h 53m
English
The shutil module is used to perform high-level file operations such as copying, removing, and renaming.
copy(src,dst)Copies the file src to the file or directory dst, retaining file permissions. src and dst are strings.
copy2(src, dst)Like copy(), but also copies the last access and modification times.
copyfile(src, dst)Copies the contents of src to dst. src and dst are strings.
copyfileobj(f1, f2 [, length])Copies all data from open file object f1 to open file object f2. length specifies a maximum buffer size to use. A negative length will attempt to copy the data entirely with one operation (that is, all data will be read as a single chunk and then written).
copymode(src, dst)Copies the permission bits from src to dst.
copystat( ...