September 2026
1051 pages
35h 4m
English
The shutil module can be regarded as a supplement to os and os.path and contains functions that relate in particular to copying and removing files. It abstracts from platform-specific commands such as copy on Windows or cp on Unix. In addition, shutil includes functions for creating and unpacking archive files, such as ZIP or TAR archives.
The functions listed in Table 30.6 are implemented by shutil, where the src and dst parameters are strings containing the path of the source and destination files, respectively.
|
Name |
Description |
|---|---|
|
Directory and File Operations |
|
|
chown(path, [user, group], {follow_symlinks}) |
Sets the owner and group of path to the passed values user and group, respectively. ... |
Read now
Unlock full access