Not sure why but when cloning on Linux / Mac the line endings default to Windows (^M) not Unix.
Running the command sed -i -e 's/\r/\n/g' filename fixes the problem, but it's worth fixing .gitattributes or writing the file correctly so that git will autodetect the file type.
Thanks for pointing this out. I code on a Mac so I'm very confused how the line endings in sd2xmltv.py became ^M. I will also add .gitattributes as you recommend.
Not sure why but when cloning on Linux / Mac the line endings default to Windows (^M) not Unix.
Running the command
sed -i -e 's/\r/\n/g' filename
fixes the problem, but it's worth fixing .gitattributes or writing the file correctly so that git will autodetect the file type.