2009/11/16 Kent Johnson :
> You might want to report this as a bug against 2.6 and submit this
> change as a proposed fix. It's easy to do, see
I poked around in the bug tracker and found [1]. It will be in 2.7 and
was *not* accepted for 2.6.
If anyone wants to add this in themselves see [2].
Gr
On Mon, Nov 16, 2009 at 7:15 AM, Sander Sweers wrote:
> This triggered my to dig into this a bit. This is not fixed untill
> python 3.1 but seems easilly added to the ZipFile class. My attempt to
> backport this from python 3.1's gzip.py below seems to work.
>
> Greets
> Sander
>
> import gzip
>
2009/11/16 Dave Angel :
> Alternatively, you could subclass it, and write your own. At a minimum, the
> __exit__() method should close() the stream.
This triggered my to dig into this a bit. This is not fixed untill
python 3.1 but seems easilly added to the ZipFile class. My attempt to
backport t
Stephen Nelson-Smith wrote:
I'm trying to write a gzipped file on the fly:
merged_log = merge(*logs)
with gzip.open('/tmp/merged_log.gz', 'w') as output:
for stamp, line in merged_log:
output.write(line)
But I'm getting:
Traceback (most recent call last):
File "./magpie.py", lin
On Mon, Nov 16, 2009 at 5:58 AM, Stephen Nelson-Smith
wrote:
> I'm trying to write a gzipped file on the fly:
>
> merged_log = merge(*logs)
>
> with gzip.open('/tmp/merged_log.gz', 'w') as output:
> for stamp, line in merged_log:
> output.write(line)
>
> But I'm getting:
>
> Traceback (m
I'm trying to write a gzipped file on the fly:
merged_log = merge(*logs)
with gzip.open('/tmp/merged_log.gz', 'w') as output:
for stamp, line in merged_log:
output.write(line)
But I'm getting:
Traceback (most recent call last):
File "./magpie.py", line 72, in
with gzip.open('