title: Reading a file with a specified delimiter for newline
body: <p>I have a file in which lines are separated using a delimeter say <code>.</code>. I want to read this file line by line, where lines should be based on presence of <code>.</code> instead of newline.  </p>
  
  <p>One way is:</p>
  
  <pre><code>f = open('file','r')
  for line in f.read().strip().split('.'):
     #....do some work
  f.close()
  </code></pre>
  
  <p>But this is not memory efficient if my file is too large. Instead of reading a whole file together I want to read it line by line.</p>
  
  <p><code>open</code> supports a parameter 'newline' but this parameter only takes <code>None, '', '\n', '\r', and '\r\n'</code> as input as mentioned <a href="http://docs.python.org/2/library/io.html" rel="noreferrer">here</a>.</p>
  
  <p><strong>Is there any way to read files line efficiently but based on a pre-specified delimiter?</strong></p>