using python to write text files with dos line endings on linux,f.write('foo\nbar\nbaz\n')