tim_one at email.msn.com
Wed Jun 2 03:20:14 CEST 1999
> >>>>> "MC" == Matej Cepl <Cepl at fpm.cz> writes:
> MC> Hi, I tried to play with gzip.py and it doesn't seem to
> MC> work. Enclosed module produced output which Windows Commander as
> MC> well as gzip refused to accept as correct gzip archive.
> I created my own file, fre-en_2.htm, and ran your script. It worked
> correctly; gzip uncompressed it. What exactly was your problem? Can
> you send me a copy of the .gz file produced?
The script opened the gzip file for output in text mode, and Matej was
running on Windows. Replacing 'w' with 'wb' fixed it.
print-"try binary mode"-ly y'rs -
timbot's first and still most useful pattern
More information about the Python-list