title: python tarfile recursive extract in memory
body: <p>I have a tar file with that contains compressed tar files.  Like this:</p>
  
  <pre><code>gnomeAware@devserv:~$ tar tf test.tar
  File1.tar.gz
  File2.tar.gz
  File3.tar.gz
  File4.tar.gz
  </code></pre>
  
  <p>tarfile expects a string as the file to open.  Is there anyway to pass it a file object?</p>
  
  <pre><code>tar = tarfile.open('test.tar', 'r') # Unpack tar
  for item in tar:
    Bundle=tar.extractfile(item) # Pull out the file
    t = tarfile.open(Bundle, "r:gz") # Unpack tar
    for tItem in t:
    ...
  </code></pre>
  
  <p>Thanks.</p>