[issue14772] Return destination values in some shutil functions

Brian Curtin report at bugs.python.org
Thu May 10 21:26:27 CEST 2012


New submission from Brian Curtin <brian at python.org>:

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.

----------
assignee: brian.curtin
components: Library (Lib)
files: shutil_return_values.diff
keywords: needs review, patch
messages: 160363
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: Return destination values in some shutil functions
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25522/shutil_return_values.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14772>
_______________________________________


More information about the Python-bugs-list mailing list