⬅︎ Back to tempfile in Python standard library
# typo...f = os.fdopen(tmp_fd, 'w+b')
tmp_fd, tmp_name = tempfile.mkstemp(suffix='.tgz') f = os.fdopen(tmp_name, 'w+b') f.write(content) ...
Comment
# typo...
f = os.fdopen(tmp_fd, 'w+b')
Parent comment
tmp_fd, tmp_name = tempfile.mkstemp(suffix='.tgz') f = os.fdopen(tmp_name, 'w+b') f.write(content) ...