Q: Python3 tarfile not working with gzipped tarballs I have a freshly compiled python 3.2.3 on CentOS 6, and I'm having trouble getting the tarfile module working with the gzipped file.
Python 3.2.3 (default, Sep 17 2012, 16:49:57) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tarfile
>>> t = tarfile.open("test.tar.gz")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/python3/lib/python3.2/tarfile.py", line 1746, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

The tar file extracts normally using the normal tar utility. Is there some dependency I'm missing?

A: Turns out I needed to compile python3 with zlib-devel installed on the box. There's no extra configure options to include, the configure script will automatically include zlib when it sees the dev libraries.
