So I got those template, they are all ending in LF and I can fill some terms inside with format and still get LF files by opening with "wb"
Those templates
It is possible to fix existing templates with messed-up ending with this code:
with open('file.tpl') as template: lines = [line.replace('\r\n', '\n') for line in template] with open('file.tpl', 'w') as template: template.writelines(lines)