shutil.copytree - wishlist

Michael P. Soulier msoulier at nortelnetworks.com_.nospam
Tue Apr 9 17:31:30 EDT 2002


    Hey people. 

    So, I was just using the very helpful shutil.copytree function, documented
like so:

copytree(src, dst[, symlinks])
    Recursively copy an entire directory tree rooted at src. The destination
directory, named by dst, must not already exist; it will be created.
Individual files are copied using copy2(). If symlinks is true, symbolic links
in the source tree are represented as symbolic links in the new tree; if false
or omitted, the contents of the linked files are copied to the new tree.
Errors are reported to standard output.

    I had symlinks in the original directory that I copied. With the symlinks
boolean turned on, this function created symlinks to the symlinks in the
original directory. 

    As a wishlist feature, I was wondering if an option of whether or not to
perform a readlink of the symlinks can be done prior to creation of those
symlinks, so that instead of pointing to the original directory, the symlinks
would reference what the originals referenced instead. 

ie. 

A -> B

copy A, we get C -> A -> B

Optionally, it would be nice to have C -> B. 

    Is there an official way to make such a wishlist request?

    Thanks as always,

    Mike

-- 
Michael P. Soulier, QX41, SKY  Tel: 613-765-4699 (ESN: 39-54699)
Optical Networks, Nortel Networks, SDE Pegasus
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix



More information about the Python-list mailing list