[Python-Dev] Enhancing the shutil module (original) (raw)

Tarek Ziadé ziade.tarek at gmail.com
Sun Jan 17 21:09:18 CET 2010


On Sun, Jan 17, 2010 at 8:55 PM, Brett Cannon <brett at python.org> wrote:

On Sun, Jan 17, 2010 at 11:51, Tarek Ziadé <ziade.tarek at gmail.com> wrote:

Hello, For 2.7/3.2, I am in the process of removing modules in Distutils that can be replaced by calls to existing functions in stdlib. For instance, "dirutil" and "fileutil" (old modules from the Python 1.x era) are going away in favor of calls to shutil (and os), so the Distutils package gets lighter. Another module I would like to move away from Distutils is "archiveutil". It contains helpers to build archives, whether they are zip or tar files. I propose to move those useful functions into shutil, as this seems the most logical place. If it's archive-agnostic then shutil is probably the best place.

In more details: It allows the creation of gzip, bzip2, tar and zip files through a single API. There's a registry of supported formats and the API is driven by a format identifier.

To do the work it uses stdlib's compression modules. Although it tries the "zip" system command as a fallback if the "zipfile" module is not present.

(notice that I've removed the support of "compress" (.Z) some time ago)

Regards Tarek

-- Tarek Ziadé | http://ziade.org



More information about the Python-Dev mailing list