I am creating a file using Python, the upload it to a unix server to be executed by a program in EM. But I found the file will only be accepted if there is "LF" only. In the Python program, if I use '\n' in the file, it produces 'CRLF', if I use '\r' in the file, it produces 'CR'. Although I can replace 'CR' with 'LF' in notepad++ before I upload it, it means an extra step which is not easy to be automated. Is there anyway to let the Python write 'LF' only into the file, no 'CRLF', or 'CR'.
Asked
Active
Viewed 50 times
0
-
I can't repro this. If you are on Windows, probably mention this. – tripleee Aug 24 '20 at 17:28
-
1See the given duplicate, using the `newline=` parameter of `print` – Prune Aug 24 '20 at 17:49
-
Yes, I am on windows. I cannot access unix. The file loading is by a tool. – Lucy Aug 25 '20 at 18:20