I have a python script that gave different output when run on a Windows machine and when run on a Mac. On digging deeper, I discovered that it was because when Python read in line breaks on the Mac (from a file), it read in \r\n, while somehow in Windows the \r disappears.
Thus, if I change every \n in the script to \r\n, it works fine on the Mac. But if I do that, it stops working on the Windows PC.
Is there an easy way to fix this problem?