Antoine Pitrou <pit...@free.fr> added the comment: It's a bug in the program's logic. The program assumes that the file pointer will have advanced by the same number of bytes as were returned by read(), but it is false when opened in text mode ('r') since text mode under Windows will convert Windows newlines ('\r\n') into C newlines ('\n').
Also, please note this is a feature of Windows itself, *not* of Python. That's why you don't see it happening on e.g. Mac OS X. And that's why the fix, short of changing the program's logic, is to open in binary mode ('rb'). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1735418> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com