[Python-Dev] Enhancing the shutil module

Paul Moore p.f.moore at gmail.com
Mon Jan 18 20:48:43 CET 2010

2010/1/18 R. David Murray <rdmurray at bitdance.com>:
> On Mon, 18 Jan 2010 10:56:05 -0500, "Steve Steiner (listsin)" <listsin at integrateddevcorp.com> wrote:
>> As much of a pain as it is to get new modules accepted, I agree that
>> mixing archiving functions into shutil is not the right way to do it
>> and that a separate archive_util module would make much more sense and
>> would give a logical place to put any extensions to archive handling.
> Looking at the source code and API for both shutil and archive_util, I
> think that the archive_util methods fit into shutil.  shutil currently
> wraps some standard library facilities with convenience functions
> for operations you might otherwise perform at the shell command line using
> OS facilities.  As far as I can tell, archive_util does the same, and
> seems quite within the shutil mission of "high level file operations".
> 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.


More information about the Python-Dev mailing list