Why is the shutil module called shutil?

Chris Rebert clp2 at rebertia.com
Fri Sep 23 23:58:41 EDT 2011


On Fri, Sep 23, 2011 at 8:36 PM, Fletcher Johnson <flt.johnson at gmail.com> wrote:
> The topic says it all:
> Why is shutil named shutil? What does it stand for? This is just a
> mild curiosity of mine.

"sh" is short for "shell", in line with Unix convention, where the
default shell is located at /bin/sh.
http://en.wikipedia.org/wiki/Shell_(computing)
http://en.wikipedia.org/wiki/Unix_shell

"util" is short for "utilities".

shutil is a utility module used to accomplish tasks which one often
does when in the shell, such as copying, moving, or removing directory
trees. But shutil (to my knowledge) is not implemented using shell
commands or by running external programs, so it thus avoids a whole
host of shell-related issues.

It's not the best name, but what with backwards compatibility and all,
it's unlikely to change any time soon.

Cheers,
Chris
--
http://rebertia.com



More information about the Python-list mailing list