title: Python : compare two files with different line endings
body: <p>I have two files. File <code>test.a</code> and <code>test.b</code>. <code>test.a</code> was pre-generated on unix machine. <code>test.b</code> is generated by user and can be generated both on windows and unix machines.</p>
  
  <p>I can't use <code>filecmp.cmp('test01/test.a', 'test01/test.b')</code> because it'll always return false, all thanks to different line endings.</p>
  
  <p>Is there any elegant solution to this? If not, what would be the best way to change line endings of unix file before comparing it?</p>
  
  <p>Thanks!</p>