title: Inconsistent line endings warning when line endings are consistent
body: <p>I was opening an auto-generated file in Visual Studio to inspect it, and Visual Studio tells me the line-endings are inconsistent. I know about the difference between LF and CRLF, so I thought I would try making a small change to the generation code to use the proper newline depending on the platform.</p>
  
  <p>I tell Visual Studio not to change it, and I close the file. I open it with Python and take a look at each of the lines with this snippet of code.</p>
  
  <pre><code>with open(filename, 'r') as f:
      # uses %r so it prints the non-formatted string (so I can see \r and \n)
      print '\n'.join(('%r' % x for x in f.xreadlines()))
  </code></pre>
  
  <p>I take a look at the output, and every line (except for the last) ends with a '\r\n'. The last line has no newline, so it contains only the text.</p>
  
  <p>I also open the file with Emacs and it doesn't auto-detect to use DOS mode, and shows me the ^M character on every line.</p>
  
  <p>Why are the line endings of the file "inconsistent" when I can see that every line is using the same line ending?</p>