[Errno 18] Invalid cross-device link using os.rename

Jeff Epler jepler at unpythonic.net
Mon Feb 14 19:31:18 EST 2005


mv is a surprisingly complex program, while os.rename is a wrapper
around rename(2) which is probably documented on your system to return
EXDEV under these circumstanes.

os.xxx is generally a fairly thin wrapper around what your OS provides,
and inherits all the "gotchas".  For some activities, os.shutil provides
something that is between os.xxx and os.system("xxx") in complexity and
capability.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050214/f12778b7/attachment.sig>


More information about the Python-list mailing list