title: create a tar file in a string using python
body: <p>I need to generate a tar file but as a string in memory rather than as an actual file. What I have as input is a single filename and a string containing the assosiated contents. I'm looking for a python lib I can use and avoid having to role my own.</p>
  
  <hr>
  
  <p>A little more work found <a href="http://www.daniweb.com/code/snippet254626.html" rel="nofollow noreferrer">these functions</a> but using a memory steam object seems a little... inelegant. And making it accept input from strings looks like even more... inelegant. OTOH it works. I assume, as most of it is new to me. Anyone see any bugs in it?</p>