Message163373
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. |
|
Date |
User |
Action |
Args |
2012-06-21 22:05:47 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, Tony.Malykh |
2012-06-21 22:05:47 | amaury.forgeotdarc | set | messageid: <1340316347.11.0.948094172018.issue15129@psf.upfronthosting.co.za> |
2012-06-21 22:05:46 | amaury.forgeotdarc | link | issue15129 messages |
2012-06-21 22:05:44 | amaury.forgeotdarc | create | |
|