tarfile doesn't work with tgz files?

Robert Dailey rcdailey at gmail.com
Sat May 16 12:33:50 EDT 2009


Hi,

I'm not a big expert on the tarfile component, but I assumed that .tgz
files were short for .tar.gz and the format was the same. When I try
to extract a .tgz file using tarfile in Python 3.0 on Windows, I get
the following error:

  File "C:\Python30\lib\tarfile.py", line 1630, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

I'm assuming this is because the .tgz format is not what I think it is
and is not supported. How can I extract .tgz files using Python 3.0?
Note that I probably can't depend on third party python modules, since
I have yet to find many that support Python 3.0.

Thanks.



More information about the Python-list mailing list