New submission from Ray.Allen <ysj....@gmail.com>: The shutil.copytree() function copies the whole tree recursively, and copy one single regular file with copy2(). I hope it can be more powerful(), that is, allow specifying a customerized copy function, rather than copy2(). To be specific, add an optional keyword argument, named "copy_func" or something like, default to copy2.
It will be useful for doing some customerized filesystem tree copying. For example, when writing something like the project install script, or update script, which need to ignore some file while copying the whole directory, or changing ".ini" file after copying, or rename the file name after copying. All the specific copy action can be done in our customerized copy function instead of copy2(). Is there anybody who has the same feature request? Or is there some other module already provides the same functionality? If so, I can provide a patch for it. Thanks! ---------- components: Library (Lib) messages: 103111 nosy: ysj.ray severity: normal status: open title: shutil.copytree() add a copy_func parameter. type: feature request versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8395> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com