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 amaury.forgeotdarc
Recipients Tony.Malykh, amaury.forgeotdarc
Date 2012-06-21.22:05:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340316347.11.0.948094172018.issue15129@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-06-21 22:05:47amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, Tony.Malykh
2012-06-21 22:05:47amaury.forgeotdarcsetmessageid: <1340316347.11.0.948094172018.issue15129@psf.upfronthosting.co.za>
2012-06-21 22:05:46amaury.forgeotdarclinkissue15129 messages
2012-06-21 22:05:44amaury.forgeotdarccreate