(Nov-27-2019, 11:56 AM)DeaD_EyE Wrote: I get some unexpected \r, but don't have time to investigate.
(Nov-27-2019, 11:56 AM)DeaD_EyE Wrote: I tested this on windows.
When using csv module pass
newline=''
as argument to open. It's stated in the docs:Quote:If csvfile is a file object, it should be opened with newline=''. 1This will resolve the extra blank lines when on Windows. On Linux it will work as expected without that argument, but no harm when it's there.
Here is the relevant docs
https://docs.python.org/3/library/csv.html#id3
https://docs.python.org/3/library/functi...-parameter
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs