title: File in memory, Python
body: <p>I have a string of text that I would like to create a .txt file out of. I would not like to allow it to be accessible to the user (for security reasons), so I would like to store the .txt file in memory (if this is even possible).</p>
  
  <p>For example:
  The string is:</p>
  
  <pre><code>'''
  Username: Bob
  Password: Coolness
  
  '''
  </code></pre>
  
  <p>I would like to save this string as a .txt file into memory. Then send it to another program.</p>
  
  <pre><code>anotherprogram.exe mytxt.txt
  </code></pre>
  
  <p>I looked around, and I am wondering if doing this is possible with <a href="http://docs.python.org/library/stringio.html" rel="nofollow">StringIO</a>? It says " Read and write strings as files".. I am not sure, Please respond if you know how to do this in anyway.</p>