[Python-Dev] Enhancing the shutil module

Nick Coghlan ncoghlan at gmail.com
Tue Jan 19 12:20:05 CET 2010

Paul Moore wrote:
> 2010/1/18 R. David Murray <rdmurray at bitdance.com>:
>> So +1 from me for putting these in shutil.
> Conceptually, I'm happy with these going into shutil (and +1 on the
> rest of Tarek's proposal, too!)
> To my mind, shutil is a module for higher-level operations on files -
> the sort of things you'd do in shell commands, like move a batch of
> files around (mv), create a directory tree (mkdir -p). Tarring or
> zipping up a batch of files fits nicely into that space.

This is also reflected in the way at least Windows handles archives
these days - it took them a couple of iterations to get it right (and
resolve some of the performance impacts), but Explorer now does a decent
job of integrating archives into the directory tree as "folders that
happen to be compressed".

Are archives as fundamental as directories and files? No. But in the
context of shutil, the fact that their internal structure is largely
about directories and files makes them more than just another arbitrary
file type.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list