> Something that doesn't require deterministicly named tempfiles was Ted > T'so's explanation linked to earlier. > > read data from important file > modify data > create tempfile > write data to tempfile > *sync tempfile to disk* > mv tempfile to filename of important file > > 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. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com