[issue15087] Add gzip function to read gzip'd strings

2012-06-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks. I didn't know that this had already been added to 3.2 -- ___ Python tracker ___ ___ Pyt

[issue15087] Add gzip function to read gzip'd strings

2012-06-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: invalid -> out of date status: open -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue15087] Add gzip function to read gzip'd strings

2012-06-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not simple gzip.GzipFile(fileobj=u).read()? -- nosy: +storchaka status: pending -> open ___ Python tracker ___ __

[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Nadeem Vawda
Nadeem Vawda added the comment: There is already such a function, gzip.decompress() - it was added in 3.2. -- nosy: +nadeem.vawda resolution: -> invalid stage: -> committed/rejected status: open -> pending ___ Python tracker

[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : The API for the gzip module is convenient for reading gzipped file but is rather awkward for reading bytes downloaded from a socket: >>> import gzip, io >>> from urllib.request import urlopen, Request >>> u = urlopen(Request('http://www.nytimes.com'