Index: Lib/gzip.py =================================================================== RCS file: /projects/cvsroot/python/dist/src/Lib/gzip.py,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** gzip.py 1998/03/26 21:12:11 1.5 --- gzip.py 1998/05/13 21:49:58 1.6 *************** *** 1,7 **** import time import string import zlib - import StringIO import __builtin__ # implements a python function that reads and writes a gzipped file --- 1,6 ---- *************** *** 157,163 **** def writelines(self,lines): self.write(string.join(lines)) ! def read(self,size=None): if self.extrasize <= 0 and self.fileobj is None: return '' --- 156,162 ---- def writelines(self,lines): self.write(string.join(lines)) ! def read(self, size=None): if self.extrasize <= 0 and self.fileobj is None: return '' *************** *** 185,191 **** def _unread(self, buf): self.extrabuf = buf + self.extrabuf ! self.extrasize = len(buf) + self.extrasize def _read(self, size=1024): try: --- 184,190 ---- def _unread(self, buf): self.extrabuf = buf + self.extrabuf ! self.extrasize = len(self.extrabuf) def _read(self, size=1024): try: *************** *** 250,256 **** c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': ! bufs.append(c[:i]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c) --- 249,255 ---- c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': ! bufs.append(c[:i+1]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c)