How to decompress .Z file?

Nick Craig-Wood nick at
Mon Aug 20 17:30:10 CEST 2007

Hyunchul Kim <sundol at> wrote:
>  How can .Z file be decompressed?

The old unix program compress used to generate these files.

You'll find the command line programs gzip/gunzip/zcat can decompress
them too.

>  According to python library reference, .Z file might not be
>  supported by python, yet.

Unfortunately the python gzip library doesn't read .Z files.

I'd pipe the data to zcat using subprocess to decompress from python.

I haven't used a .Z files for many many years - where are you getting
them from?

Nick Craig-Wood <nick at> --

More information about the Python-list mailing list