I’ve found this snippet, which seems to do the job, but I can’t understand why it uses StringIO. Isn’t f already a file-like object? What is the need to read it, then make it look like a file again, only to read it again? I’ve tested it (well, a slightly modified version of it), and it doesn’t work without StringIO.
I’ve found this snippet , which seems to do the job, but I can’t
Share
Seems to be a flaw in python standard library which is fixed in Python 3.2.
see http://www.enricozini.org/2011/cazzeggio/python-gzip/
urllibandurllib2file objects do not provide a methodtell()as requested by gzip.