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 Jimbofbx
Recipients Jimbofbx, amaury.forgeotdarc
Date 2011-05-04.16:18:35
SpamBayes Score 4.302937e-10
Marked as misclassified No
Message-id <1304525916.59.0.79592012085.issue11990@psf.upfronthosting.co.za>
In-reply-to
Content
Yes and no, I can give you a single process single child example that just shows that python 3.2 uses binary output while python 3.1 used system default when piping, but trying to reproduce the multiprocessing output inconsistencies would be... difficult. Unfortunately the software I used to spot the \n, \r\n inconsistency with is proprietary. After creating a sample case in only python I couldn't reproduce the inconsistent \r\n issue in python 3.2 so I cannot say for certain that it wasn't caused by my C# program. I wouldn't worry about the inconsistent endlines for now.

Note that I don't see in the "what's new" documentation it mentioning that 3.2 changed the behavior of piped output. Kind of a big deal.

Sample code to compare 3.1 and 3.2 piped output:

import sys;
import os;
import subprocess;
from time import sleep;

python31loc = r"C:\python31\python.exe";
python32loc = r"C:\python32\python.exe";

myname = "IOPipetest.py";

def main(args):
    if(len(args) == 1):
        # main code
        print("Testing python 3.1 endlines.", end='\r\n');
        output = subprocess.check_output("%s %s -output" % (python31loc, myname));
        print(output);
        print("Testing python 3.2 endlines.", end='\r\n');
        output = subprocess.check_output("%s %s -output" % (python32loc, myname));
        print(output);
        sleep(7);
    else:
        for i in range(4):
            print("TESTING DEFAULT"); # endline is supposed to be automatic
            print("TESTING SLASH-EN\n", end='');
            print("TESTING WINDOW-RETURN\r\n", end='');
        

if __name__ == "__main__":
    main(sys.argv);

--------------------------------------

sample output:

Testing python 3.1 endlines.

b'TESTING DEFAULT\r\nTESTING SLASH-EN\r\nTESTING WINDOW-RETURN\r\r\nTESTING DEFAULT\r\nTESTING SLASH-EN\r\nTESTING WINDOW-RETURN\r\r\nTESTING DEFAULT\r\nTESTING SLASH-EN\r\nTESTING WINDOW-RETURN\r\r\nTESTING DEFAULT\r\nTESTING SLASH-EN\r\nTESTING WINDOW-RETURN\r\r\n'
Testing python 3.2 endlines.

b'TESTING DEFAULT\nTESTING SLASH-EN\nTESTING WINDOW-RETURN\r\nTESTING DEFAULT\nTESTING SLASH-EN\nTESTING WINDOW-RETURN\r\nTESTING DEFAULT\nTESTING SLASH-EN\nTESTING WINDOW-RETURN\r\nTESTING DEFAULT\nTESTING SLASH-EN\nTESTING WINDOW-RETURN\r\n'
History
Date User Action Args
2011-05-04 16:18:36Jimbofbxsetrecipients: + Jimbofbx, amaury.forgeotdarc
2011-05-04 16:18:36Jimbofbxsetmessageid: <1304525916.59.0.79592012085.issue11990@psf.upfronthosting.co.za>
2011-05-04 16:18:35Jimbofbxlinkissue11990 messages
2011-05-04 16:18:35Jimbofbxcreate