[Python-Dev] Enhancing the shutil module

Tarek Ziadé ziade.tarek at gmail.com
Mon Jan 18 16:24:37 CET 2010

On Mon, Jan 18, 2010 at 3:56 PM, Masklinn <masklinn at masklinn.net> wrote:
>> Well - isn't what's being proposed "a number of high-level operations on files and collections of files." ?
> Well no those are high-level operations on a very restricted set of file types (archives)

not really: make_archive/unpack_archive, are also dealing with files
and directories.

>> Proliferation of modules is itself a bad thing though.
> Yes, but so is the loss of focus of a module. I hate using that argument, but I fear this would be a step on a slippery slope of making shutil a monster-bag of anything that has to do with inodes, no matter how tenuous or removed the connection is.
> Plus having this as a toplevel module/package would open the window to moving all archive-related modules within it (in the py4 window), à la xml package without having to move itself.

I am not sure why this would happen. For instance, shutil is already
on the top of the os module since a few major versions IIRC, because
it reads and writes files and directories. But it was not moved into
the os package (or vice-versa)

The shutil module uses APIs to read and write files. So if it works
with archives, it's just a specific read/write API that is used, but
that doesn't mean tarfile and zipfile might be reunited with shutil

If the shutil module is restricted to high-level files and directories
manipulation, working with archives is just a target like another I

But at the end I am 0- to create a new module, because what really
matters to me is to take it out of Distutils :)


Tarek Ziadé | http://ziade.org

More information about the Python-Dev mailing list