You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often find it necessary to use some shutil functionalities in scripts. It does the right thing efficiently, has more precise error handling than cmake -E, and, most importantly, is cross-platform.
Precedent
The zipfile module can be used by py -m zipfile. It gains credits for being a cross-platform ZIP64 decompressor.
Details
The subcommands should cover copyfile, copystat, copy, copy2, copytree, rmtree, move, chown, which, make_archive, and unpack_archive;
The keyword arguments that are easy to represent in cmdline should be adapted into --kw arg cmdline options; flags can follow the style --follow_symlinks and --no-follow_symlinks.
Feature or enhancement
Proposal:
Introduction
I often find it necessary to use some
shutil
functionalities in scripts. It does the right thing efficiently, has more precise error handling thancmake -E
, and, most importantly, is cross-platform.Precedent
The
zipfile
module can be used bypy -m zipfile
. It gains credits for being a cross-platform ZIP64 decompressor.Details
copyfile
,copystat
,copy
,copy2
,copytree
,rmtree
,move
,chown
,which
,make_archive
, andunpack_archive
;--kw arg
cmdline options; flags can follow the style--follow_symlinks
and--no-follow_symlinks
.shutil
)Links
DPO: https://discuss.python.org/t/turn-shutil-into-a-runnable-module/70503
The text was updated successfully, but these errors were encountered: