GzipFile has a parameter 'fileobj' which you could use.
GzipFile( [filename[, mode[, compresslevel[, fileobj)
For iteratng over the file
how about :
line = oldfileobj.readline()
while line !="":
oldmd5.update(line)
line = oldfileobj.readline()
--
http://mail.python.org/mailman/listinf
On Friday 01 April 2005 11:54, Justin Guerin wrote:
> Hello list,
>
> gzip documentation states that calling the .close() method on a GzipFile
> doesn't really close it. If I'm really through with it, what's the best
> way to close it? I'm using Python2.2 (but the gzip module doesn't seem
> to be
Hello list,
gzip documentation states that calling the .close() method on a GzipFile
doesn't really close it. If I'm really through with it, what's the best
way to close it? I'm using Python2.2 (but the gzip module doesn't seem to
be any different from 2.4).
Here's my code snippet, if it's r