This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: a move function for shutil.py
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, loewis, wamcvey
Priority: low Keywords: patch

Created on 2001-08-05 00:08 by wamcvey, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch wamcvey, 2001-08-05 00:08 patchfile against shutil.py
shutil.diff loewis, 2002-03-09 11:24
Messages (4)
msg37158 - (view) Author: William McVey (wamcvey) Date: 2001-08-05 00:08
Although shutil.py has some nice copy functions but no
real equivalent of mv(1).  This is a very simple
implimentation (as in not a whole lot of stuff has been
implimented) but it's functional.  Simply calls rename,
and if that fails tries to copy and unlink.
msg37159 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-08-08 15:41
Logged In: YES 
user_id=6380

This is OK, but only perpetuates the problem with this
module -- it doesn't have a decent error handling strategy
(prints to stdout!?!?!?!).

If someone wants to put some more effort in this, I would
recommend at least adding an option to copytree() to control
error handling.
msg37160 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-09 11:24
Logged In: YES 
user_id=21627

Here is an attempt to provide error handling for copytree.
It collects all exceptions in a list, and raises them as
shutil.Error.

This would be inconsistent with shutil.rmtree, which offers
the choice of ignore errors,invoke an error callback, or
raise an exception at the problem.

Which of these alternatives would you like to see implemented?
msg37161 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-07 13:24
Logged In: YES 
user_id=21627

Committed as shutil.py 1.24, libshutil.tex 1.11, NEWS 1.494.
History
Date User Action Args
2022-04-10 16:04:16adminsetgithub: 34893
2001-08-05 00:08:04wamcveycreate