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.

作者 vstinner
收信人 tarek, vstinner
日期 2010-05-27.09:45:56
SpamBayes Score 0.4503371
Marked as misclassified
Message-id <1274953559.42.0.416381234076.issue8828@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2010-05-27 09:45:59vstinner修改recipients: + vstinner, tarek
2010-05-27 09:45:59vstinner修改messageid: <1274953559.42.0.416381234076.issue8828@psf.upfronthosting.co.za>
2010-05-27 09:45:57vstinner链接issue8828 messages
2010-05-27 09:45:56vstinner创建