[issue29245] Can't write to NamedTemporaryFile

2017-01-11 Thread R. David Murray
R. David Murray added the comment: Yes, it is intended behavior, and it is documented. The default mode for NamedTemporaryFile (and TemporaryFile) is shown in the docs as "w+b". I suppose that used to be more convenient in python2 where there was almost no distinction between binary and text

[issue29245] Can't write to NamedTemporaryFile

2017-01-11 Thread Kevin Bonham
New submission from Kevin Bonham: Python 3.6.0 (default, Dec 24 2016, 08:01:42) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from tempfile import NamedTemporaryFile >>> tmp = NamedTemporaryFile() >