New file utility for shutil - linktree.py

Greg Ward gward at python.net
Fri Jan 3 10:26:01 EST 2003


On 02 January 2003, David MacQuigg said:
> Thanks for your feedback on this proposal.  We could modify copy_tree
> to add a 'link' argument, but that still is not what we need.  The
> resulting 'newtree' would contain a link for every file in the
> oldtree.  The 'linktree' function produces a 'newtree' with only the
> minimum links necessary to access all the old files.  i.e. it doesn't
> descend into directories where there are no new files, but simply
> relies on the link to the old parent directory to access all the old
> files on that branch.

Ahh, OK, I get it.  I didn't see the distinction, but now I do.

> Python can change all this.  In fact we are 90% there with what is in
> the various modules I've looked at.  We just need to put the most
> usefule stuff in one place, add a few minor enhancements, and resist
> the temptation to do everything.  Python has the unique advantage that
> well-written scripts are easy to modify.  So if we leave out some
> option that a user needs, he can easily add it.

It sounds to me like it would be useful for you to have this function in
the standard library, but hardly essential.  IMHO, you should make sure
that you've got exactly what you need and it works perfectly for you.
Once you've done that, release it as a standalone module and see if it's
useful to lots of other people.  If it is, and if it's well-tested and
well-documented, *then* propose it for inclusion in the standard
library.  No need to rush these things.

        Greg
-- 
Greg Ward <gward at python.net>                         http://www.gerg.ca/
I'd like some JUNK FOOD ... and then I want to be ALONE --





More information about the Python-list mailing list