In article <4c645c39$0$1595$742ec...@news.sonic.net>, John Nagle <na...@animats.com> wrote: > >I'm reading a URL which is a .gz file, and decompressing it. This >works, but it seems far too complex. Yet none of the "wrapping" >you might expect to work actually does. You can't wrap a GzipFile >around an HTTP connection, because GzipFile, reasonably enough, needs >random access, and tries to do "seek" and "tell". Nor is the output >descriptor from gzip general; it fails on "readline", but accepts >"read". (No good reason for that.) So I had to make a second copy.
Also consider using zlib directly. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...if I were on life-support, I'd rather have it run by a Gameboy than a Windows box." --Cliff Wells -- http://mail.python.org/mailman/listinfo/python-list