problems with re in binary files
Steven D. Arnold
stevena at neosynapse.net
Thu Sep 20 23:54:09 EDT 2001
Hi Tim,
Thursday, September 20, 2001, 4:32:33 AM, you wrote:
>> Anyone have any idea what I should do? ...
TP> Post a failing test case, and the cause will be obvious to someone.
TP> it's-always-the-last-place-you-look-ly y'rs - tim
Yep! Turns out it had nothing to do with the regex. The file was a
binary file, and when I opened it in "r" mode and called readlines, I
didn't get all of the file. When I opened it in "rb" mode, it started
working. The manual seems to suggest this is only an issue on some
operating systems, such as Windows.
Thanks for the feedback!
-----------------------------------------------------
Steven D. Arnold stevena at neosynapse.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Python-list
mailing list