Martin v. Löwis wrote: >>>> The sync is necessary to ensure that the data is written to the disk >>>> before the old file overwrites the new filename. >>> You still wouldn't use the tempfile module in that case. Instead, you >>> would create a regular file, with the name base on the name of the >>> important file. >>> >> Uhm... why? > > Because it's much easier not to use the tempfile module, than to use it, > and because the main purpose of the tempfile module is irrelevant to > the specific application; the main purpose being the ability to > auto-delete the file when it gets closed. > auto-delete is one of the nice features of tempfile. Another feature which is entirely appropriate to this usage, though, though, is creation of a non-conflicting filename. -Toshio -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/python-dev/attachments/20090312/14be757d/attachment.pgp>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4