I've got 2.7 and 3.3 versions. The 3.3 is in spyder on windows. The 2.7 is python in linux.
I'm reading data from a socket, and If I do this,
It outputs correctly, with the newlines in the data causing output on separate lines, as desired.
But this won't work in 3.3 and so, I've done this,
and then it spits out all the text and replaces the newlines with \n instead and doesn't actually do the newlines.
How can I do this compatibly between the 2 versions?
I'm reading data from a socket, and If I do this,
print "received data:", data
It outputs correctly, with the newlines in the data causing output on separate lines, as desired.
But this won't work in 3.3 and so, I've done this,
print("received data:",data)
and then it spits out all the text and replaces the newlines with \n instead and doesn't actually do the newlines.
How can I do this compatibly between the 2 versions?
Larz60+ write Jul-03-2021, 11:51 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time