Message104837
| Author |
pitrou |
| Recipients |
eric.smith, olemis, pitrou, tarek |
| Date |
2010年05月03日.13:53:10 |
| SpamBayes Score |
0.03319571 |
| Marked as misclassified |
No |
| Message-id |
<1272894932.21551.0.camel@localhost.localdomain> |
| In-reply-to |
<1272894145.15.0.703696748784.issue8604@psf.upfronthosting.co.za> |
| Content |
> @Antoine: Yes, that would be the idea (provide a robust pattern by
> using a temporary file, then rename it)
Then perhaps it would be better as a context manager:
with shutil.atomic_write("foo", "wb") as f:
f.write("mycontents") |
|