title: python readlines() does not contain whole file
body: <p>I have an auto-generated info file coming from a measurement. It consists of both binary as well as human readable parts. I want to extract some of the non binary meta data. For some files, I am not able to get to the meta data, as the <code>readlines()</code> does not yield the whole file. I guess that the file contains some EOF char. I can open the file in notepad++ without problems. </p>
  
  <p>A possible solution to this problem would be to read in the file binary and parse it to char afterwards, deleting the EOF char while doing so. Anyhow, I wonder if there is a more elegant way to do so?</p>
  
  <p>Edit:
  The question was rightfully downvoted, I should have provided code. I actually use </p>
  
  <pre><code>f = open(fname, 'r')
  raw = f.readlines()
  </code></pre>
  
  <p>and then proceed with walking through the list. The EOF chars that are existing (depending on the OS) seem to cause the havoc I am observing. I will accept the answer that states using the binary <code>'rb'</code> flag. By the way, this was an impressive response time! (-:</p>