How do I read compressed (.Z) files
Alvaro Figueiredo
alvarof at freeshell.org
Wed May 26 13:42:01 EDT 2004
Em Qua 26 Mai 2004 14:29, Mark Wall escreveu:
> If I have a UNIX compressed text file 'python.txt.Z' with
> contents: "Python
> "
>
> How do I read this data without uncompressing the file?
>
> Thank you,
> Mark
I am not sure, but the standard library module zlib may help you.
If not, try something like:
os.popen('zcat python.txt.Z')
--
Alvaro Figueiredo
alvarof at freeshell.org
More information about the Python-list
mailing list