Python write in mkstemp() file
<p>I am creating a tmp file by using :</p>

<pre><code>from tempfile import mkstemp
</code></pre>

<p>I am trying to write in this file :</p>

<pre><code>tmp_file = mkstemp()
file = open(tmp_file, 'w')
file.write('TEST\n')
</code></pre>

<p>Indeed I close the file and do it proper but when I try to cat the tmp file, it stills empty..It looks basic but I don't know why it doesn't work, any explanations ?</p>