Amaury Forgeot d'Arc <[email protected]> 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, or EOF)
The best solution here is probably to open the file in "universal" mode:
f = open("test.txt", "rU")
...Or use Python3, which has a completely new implementation of the open()
function.
----------
nosy: +amaury.forgeotdarc
resolution: -> wont fix
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15129>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com