-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed as not planned
Description
Feature or enhancement
Proposal:
Introduction
py -m shutil copy2 ~/my/src.txt .
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
, andunpack_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
. - It would be even nicer if combined with a progress bar (See also: Add a basic progressbar implementation to
shutil
)
Links
DPO: https://discuss.python.org/t/turn-shutil-into-a-runnable-module/70503
Linked PRs
Metadata
Metadata
Assignees
Labels
No labels