How can I remove the ^M character from a text file (at the end of line) in a Python script?
^M
I did the following, and there are ^M at every line-break.
file = open(filename, "w") file.write(something)
string.replace('\r', '') worked for me.
Ugly, but nor r+ nor r+b nor NOTHING ELSE worked (for me, sure) :(