Very small zlib/svg problem

Skip Montanaro skip at pobox.com
Thu Mar 28 09:32:18 EST 2002


    >> f = gzip.open("c:/test.svgz", "w")
    Oleg>                      ^^ this suggests to use binary modes for binary files:
    Oleg>       f = gzip.open("c:/test.svgz", "wb")

Agreed.  (I'm a Unix weenie, so this "b" stuff isn't second nature to me.)
This occurred to me later.  It seems to me that since all gzip files will be
binary, the gzip module should transparently append a "b" to the mode if
it's not given.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list