Amaury Forgeot d'Arc added the comment:
Your problem is similar to this discussion:
http://stackoverflow.com/questions/405058/line-reading-chokes-on-0x1a
On Python2, files are based on the fopen() C function, and on Windows files
opened in text mode stop reading on the first character 26 (^Z, o
New submission from Tony Malykh :
readline() or readlines() method can read the file up to the line where weird
character ascii code 26 appears. I would like to read the entire file though. A
simple example attached.
--
components: IO
files: testpy.zip
messages: 163363
nosy: Tony.Malyk