⬅︎ Back to tempfile in Python standard library
tmp_fd, tmp_name = tempfile.mkstemp(suffix='.tgz')f = os.fdopen(tmp_name, 'w+b')f.write(content)...
NM... Follow Richard's suggestion.
# typo...f = os.fdopen(tmp_fd, 'w+b')
Comment
tmp_fd, tmp_name = tempfile.mkstemp(suffix='.tgz')
f = os.fdopen(tmp_name, 'w+b')
f.write(content)
...
Replies
NM... Follow Richard's suggestion.
# typo...
f = os.fdopen(tmp_fd, 'w+b')