Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does shutil (in Python) mean? [closed]

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.

like image 558
Justin Avatar asked Mar 10 '11 18:03

Justin


People also ask

What does Shutil mean in Python?

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.

How do you pronounce Shutil in Python?

ess-age-util, I guess. I've always pronounced it shoo-teel as well.

What is Shutil copy return?

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.

How does Shutil Copytree work?

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.


1 Answers

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.).

like image 190
Rafe Kettler Avatar answered Oct 17 '22 02:10

Rafe Kettler