[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-28 Thread James Dominy

James Dominy added the comment:

Ah, I did some digging. It turns out pbzip2 is installed on the system in 
question, and more annoyingly, /usr/bin/bzip2 is a symlink to pbzip2. I didn't 
realise the file was compressed by pbzip2.

Thanks for the help.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20781
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-27 Thread James Dominy

James Dominy added the comment:

How does one create a multi-stream bzip2 file in the first place? And how do I 
tell it's multi-stream.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20781
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20781] BZ2File does decompress some .bz2 files correctly

2014-02-26 Thread James Dominy

New submission from James Dominy:

bz2.BZ2File does not decompress a file (see attached) correctly. This file can 
be decompressed and compressed via stadard unix tools (bzip2 and bunzip2) 
without change.

Consider ...

$ python
Python 2.7.6 (default, Dec  7 2013, 22:49:16) 
[GCC 4.8.2] on linux2
Type help, copyright, credits or license for more information.
 import bz2
 import hashlib
 len(bz2.BZ2File(example-file.csv.bz2, r, 0).read())
90
 hashlib.md5(bz2.BZ2File(example-file.csv.bz2, r, 0).read()).hexdigest()
'e2d4ce212a040c879cb256f88c9faab9'
 len(bz2.BZ2File(example-file.csv.bz2, rb, 0).read())
90
 hashlib.md5(bz2.BZ2File(example-file.csv.bz2, rb, 0).read()).hexdigest()
'e2d4ce212a040c879cb256f88c9faab9'
 

It looks like bz2 is not dealing with the second block. This is not the first 
file I've come across that has this problem, and initially I thought it was the 
file not the module. I've attached a copy of the file.

I use gentoo on a 64bit intel core i5.

--
components: IO
files: example-file.csv.bz2
messages: 212250
nosy: James.Dominy
priority: normal
severity: normal
status: open
title: BZ2File does decompress some .bz2 files correctly
versions: Python 2.7
Added file: http://bugs.python.org/file34230/example-file.csv.bz2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20781
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-26 Thread James Dominy

Changes by James Dominy jgdom...@gmail.com:


--
title: BZ2File does decompress some .bz2 files correctly - BZ2File doesn't 
decompress some .bz2 files correctly

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20781
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-26 Thread James Dominy

James Dominy added the comment:

Whoops, forget to add the output from the standard binutils

$ bzcat example-file.csv.bz2 | wc -c
909602
$ bzcat example-file.csv.bz2 | md5sum
48f4b69b2b8bb0b171ebc36313eb6616  -

As you can see file sizes and hashes do not match

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20781
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1503502] Pdb doesn't call flush on its stdout file descriptor

2008-06-28 Thread James Dominy

James Dominy [EMAIL PROTECTED] added the comment:

I've been working on a patch that allows pdb when run as a script to
split it's output such that the program being debugged uses a specified
tty for stdin/stdout, and leave the pdb.py IO on the original
stdin/stdout. I think perhaps these efforts should be merged. Certainly
your suggested patch would make my work much easier.

--
nosy: +sirlark

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1503502
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com