report at bugs
May 10, 2012, 12:26 PM
Post #1 of 10
New submission from Brian Curtin <brian [at] python>:
[issue14772] Return destination values in some shutil functions
Attached is a patch to return the final destination of files or directories sent through shutil's copy, copy2, and move functions. This removes the need to construct the destination path on your own.
This is especially useful for copy/copy2 where you copy a file into a directory and need to know that resulting path. Rather than calling os.path.join(dest, os.path.basename(source)) you could get that path from copy/copy2 (which does that join internally).
Patch has docs and tests.
components: Library (Lib)
keywords: needs review, patch
stage: patch review
title: Return destination values in some shutil functions
versions: Python 3.3
Added file: http://bugs.python.org/file25522/shutil_return_values.diff
Python tracker <report [at] bugs>
Python-bugs-list mailing list