New submission from Brian Curtin <br...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue14772>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to