title: create & read from tempfile
body: <p>Is there anyway I could write to tempfile and include it in a command, and then close/remove it. I would like to execute the command, eg: some_command /tmp/some-temp-file.<br>
  Many thanks in advance.</p>
  
  <pre><code>import tempfile
  temp = tempfile.TemporaryFile()
  temp.write('Some data')
  command=(some_command temp.name)
  temp.close()
  </code></pre>