title: Python: Unpack a list of tar files
body: <p>i want to extract all files from multiple tar-archives, but whatever i do, it won't work.
  Lets say, i have two tar files in C:\Temp. So i thought, all i have to do is to get a list of the *.tar files in C:\temp, and extract it with a loop:</p>
  
  <pre><code>import glob
  import tarfile
  
  archivelist = glob.glob('C:\\Temp\\*.tar')
  for x in archivelist:
      tar=tarfile.open(archivelist)
      tar.extractall()
      tar.close()
  </code></pre>
  
  <p>What is the problem? Even after hours of searching, i couldn't find a helpful example...</p>
  
  <p>Thanks!</p>