*** /home/skip/tmp/gzip.py.~1.31~ Tue Apr 9 11:29:57 2002 --- /home/skip/tmp/gzip.py Tue Apr 9 11:29:57 2002 *************** *** 35,40 **** --- 35,44 ---- def __init__(self, filename=None, mode=None, compresslevel=9, fileobj=None): + # guarantee the file is opened in binary mode on platforms + # that care about that sort of thing + if mode and 'b' not in mode: + mode += 'b' if fileobj is None: fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') if filename is None: