This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author catlee
Recipients
Date 2005-04-28.12:00:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=186532

How is test.bz2 not a valid bz2 file?  The command line tool
"bzcat" or "bunzip2" can operate properly on it.  Using
BZ2File("test.bz2").read() works properly, it's just the
readlines() call that breaks.

Try this out:
import bz2
bz2.BZ2File("test.bz2","w").write("testing123")

# This works fine
assert bz2.BZ2File("test.bz2").read() == "testing123"

# This raises a RuntimeError
assert bz2.BZ2File("test.bz2").readlines() == ["testing123"]
History
Date User Action Args
2007-08-23 14:31:15adminlinkissue1191043 messages
2007-08-23 14:31:15admincreate