Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « shutil »

Liste des exceptions du module shutil

Nom de la classe d'exception Description
Error
ExecError Raised when a command could not be executed [extrait de ExecError.__doc__]
ReadError Raised when an archive cannot be read [extrait de ReadError.__doc__]
RegistryError Raised when a registry operation with the archiving [extrait de RegistryError.__doc__]
SameFileError Raised when source and destination are the same file. [extrait de SameFileError.__doc__]
SpecialFileError Raised when trying to do a kind of operation (e.g. copying) which is [extrait de SpecialFileError.__doc__]

Liste des fonctions du module shutil

Signature de la fonction Description
chown(path, user=None, group=None) Change owner user and group of the given path. [extrait de chown.__doc__]
copy(src, dst, *, follow_symlinks=True) Copy data and mode bits ("cp src dst"). Return the file's destination. [extrait de copy.__doc__]
copy2(src, dst, *, follow_symlinks=True) Copy data and metadata. Return the file's destination. [extrait de copy2.__doc__]
copyfile(src, dst, *, follow_symlinks=True) Copy data from src to dst in the most efficient way possible. [extrait de copyfile.__doc__]
copyfileobj(fsrc, fdst, length=0) copy data from file-like object fsrc to file-like object fdst [extrait de copyfileobj.__doc__]
copymode(src, dst, *, follow_symlinks=True) Copy mode bits from src to dst. [extrait de copymode.__doc__]
copystat(src, dst, *, follow_symlinks=True) Copy file metadata [extrait de copystat.__doc__]
copytree(src, dst, symlinks=False, ignore=None, copy_function=<function copy2 at 0x7f720d4a4ea0>, ignore_dangling_symlinks=False, dirs_exist_ok=False) Recursively copy a directory tree and return the destination directory. [extrait de copytree.__doc__]
disk_usage(path) Return disk usage statistics about the given path. [extrait de disk_usage.__doc__]
get_archive_formats() Returns a list of supported formats for archiving and unarchiving. [extrait de get_archive_formats.__doc__]
get_terminal_size(fallback=(80, 24)) Get the size of the terminal window. [extrait de get_terminal_size.__doc__]
get_unpack_formats() Returns a list of supported formats for unpacking. [extrait de get_unpack_formats.__doc__]
ignore_patterns(*patterns) Function that can be used as copytree() ignore parameter. [extrait de ignore_patterns.__doc__]
make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, dry_run=0, owner=None, group=None, logger=None) Create an archive file (eg. zip or tar). [extrait de make_archive.__doc__]
move(src, dst, copy_function=<function copy2 at 0x7f720d4a4ea0>) Recursively move a file or directory to another location. This is [extrait de move.__doc__]
register_archive_format(name, function, extra_args=None, description='') Registers an archive format. [extrait de register_archive_format.__doc__]
register_unpack_format(name, extensions, function, extra_args=None, description='') Registers an unpack format. [extrait de register_unpack_format.__doc__]
rmtree(path, ignore_errors=False, onerror=None, *, dir_fd=None) Recursively delete a directory tree. [extrait de rmtree.__doc__]
unpack_archive(filename, extract_dir=None, format=None) Unpack an archive. [extrait de unpack_archive.__doc__]
unregister_archive_format(name)
unregister_unpack_format(name) Removes the pack format from the registry. [extrait de unregister_unpack_format.__doc__]
which(cmd, mode=1, path=None) Given a command, mode, and a PATH string, return the path which [extrait de which.__doc__]

Liste des variables globales du module shutil

Nom de la variable globale Valeur
COPY_BUFSIZE 65536
nt None