Alleged deprecation of shutils (Re: [Python-Dev] Function in os module for available disk space, why)

Peter Funk pf@artcom-gmbh.de
Thu, 22 Mar 2001 15:17:46 +0100 (MET)


Hi,

Guido van Rossum schrieb:
> > >>>>> "GE" == Greg Ewing <greg@cosc.canterbury.ac.nz> writes:
> > 
> >     GE> Wouldn't it be better to fix these functions on the Mac
> >     GE> instead of depriving everyone else of them?
> > 
> > Either way, shutil sure is useful!
> 
> Yes, but deceptively so.  What should we do?  Anyway, it doesn't
> appear to be officially deprecated yet (can't see it in the docs) and
> I think it may be best to keep it that way.

A very simple idea would be, to provide two callback hooks,
which will be invoked by each call to copyfile or remove.

Example:  Someone uses the package netatalk on Linux to provide file
services to Macs.  netatalk stores the resource forks in hidden sub
directories called .AppleDouble.  The callback function could than
copy the .AppleDouble/files around using shutil.copyfile itself.

Regards, Peter