I knew what this module is for, I just don't know why they choose this name - shutil. It is hard to remember this kind of "random" name if I don't know where it come from. Please give me some hints, thanks.
copy() method in Python is used to copy the content of the source file to the destination file or directory. It also preserves the file's permission mode but other metadata of the file like the file's creation and modification times is not preserved.
ess-age-util, I guess. I've always pronounced it shoo-teel as well.
shutil. copy() method is used to copy specified source (without the metadata) to the destination file or directory and it will return the path to the newly created file.
shutil. copytree() method recursively copies an entire directory tree rooted at source (src) to the destination directory. The destination directory, named by (dst) must not already exist. It will be created during copying.
It means "shell utilities", sh standing for shell, util standing for utilities.
If you think about what shutil does, that makes sense (manipulate the filesystem, make archives, etc.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With