code: def untar_file(tarname, target_dir='.'):
      '''Uncompress a tar file.'''
  
      o = tarfile.open(tarname, 'r:gz')
      members = o.getmembers()
      for member in members:
          o.extract(member, target_dir)
      o.close(f untar_file(tarname, target_dir='.'):
      '''Uncompress a tar file.'''
  
      o = tarfile.open(tarname, 'r:gz')
      members = o.getmembers()
      for member in members:
          o.extract(member, target_dir)
      o.close()
docs: Uncompress a tar file.