I am trying to test csv files generated using csv.writer
on python 2 & 3 on Linux (Ubuntu 16.04 x64) and Windows(x64). Unfortunately, Windows adds an extra \r
everytime it writes to a file.
I thought I would debug this by trying to print repr
of the lines in these files, but the output of repr
doesn't show the presence of a \r
on Windows.
For example, a line from a csv file is showed as this in the terminal in Windows:
'display,resource,refs\n'
The same sentence from the same file is shown as this on Ubuntu:
'display,resource,refs\r\n'
How can I possibly debug these extra \r
that get added to my files?