STINNER Victor <victor.stin...@haypocalc.com> added the comment: A first implementation can be:
if os.name in ('nt', 'ce'): def atomic_rename(a, b): if os.path.exists(b): unlink(b) rename(a, b) else: atomic_rename = os.rename This implementation is atomic on POSIX, and not atomic on Windows. Tell me if I am wrong. It can be improved later by adding the support of better Windows functions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8828> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com