title: Max size of a file Python can open?
body: <p>I opened an 8&nbsp;MB file in Python, because I wanted to batch change various types of file names. I went through and loaded the file into a string and used the string method replace to replace everything. I then noticed that only half of the file was being replaced; as if Python wasn't fully opening the file. </p>
  
  <p>Is there some kind of string size limit or max file size limit that I must play within the bounds of in Python?</p>
  
  <p>Refer to the code in <a href="https://stackoverflow.com/questions/7125510/python-search-and-replace-not-replacing-properly">Python search and replace not replacing properly</a>.</p>
  
  <p>I have changed to the suggested code. The buffer is an 8&nbsp;MB HTML file that is over 150k lines. The replacement code works perfectly; it's just that it's not replacing everything. Or for example one error that is a pain is:</p>
  
  <p>When I'm attempting to replace the string ff10 to FF-10, it'll be changed to FF-010. </p>