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?
glob.globdoesn't claim to return results in any particular order, so no reason to expect them to be in any particular order