[Python-ideas] `to_file()` method for strings

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Mar 23 00:40:56 EDT 2016


On Wed, Mar 23, 2016 at 12:33 AM, Chris Angelico <rosuav at gmail.com> wrote:

> >>     with tempfile.NamedTemporaryFile('w', dir=os.path.dirname(path),
> ..
> It's specifically selecting a directory for the temp file, so it ought
> to work.


I did not notice this.  Thanks, Chris.  Still not all filesystems do rename
atomically.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160323/f7bffbc6/attachment.html>


More information about the Python-ideas mailing list