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 astrobuf
Recipients Jimbofbx, amaury.forgeotdarc, astrobuf, brian.curtin, vinay.sajip, vstinner
Date 2012-01-09.07:12:52
SpamBayes Score 9.1814165e-08
Marked as misclassified No
Message-id <1326093173.73.0.463717512877.issue11990@psf.upfronthosting.co.za>
In-reply-to
Content
I have having the same issues as Jimbofbx. This seems to stem from changes due to issue 10841. All stdio is now opened in binary mode, in consideration that it is the TextIOWrapper's job to do endline translation.

The problem here is that the newline mode = '\n' for the TextIOWrapper created for stdout. ( see pythonrun.c: create_stdio() ). For windows, the newline mode for stdin is already set to null enabling universal newline translation on input, and it should be set to null for newline transation on output as well.

OLD CODE
newline = "\n";
#ifdef MS_WINDOWS
if (!write_mode) {
    /* translate \r\n to \n for sys.stdin on Windows */
    newline = NULL;
}
#endif


FIXED??? CODE
newline = "\n";
#ifdef MS_WINDOWS
/* translate \r\n to \n for sys.stdin on Windows */
/* translate \n to \r\n for sys.stdout on Windows */
newline = NULL;
#endif
History
Date User Action Args
2012-01-09 07:12:53astrobufsetrecipients: + astrobuf, vinay.sajip, amaury.forgeotdarc, vstinner, brian.curtin, Jimbofbx
2012-01-09 07:12:53astrobufsetmessageid: <1326093173.73.0.463717512877.issue11990@psf.upfronthosting.co.za>
2012-01-09 07:12:53astrobuflinkissue11990 messages
2012-01-09 07:12:52astrobufcreate