title: Text extraction using python
body: <p>I am trying to print all the below content  of text file once a keyword is encountered using python.</p>
  
  <p>Below is the code which I have written.</p>
  
  <pre><code>Filepath="D:/xyz.txt"
  with open(filepath)as fp
   for line in fp:
    for path in line.split(" ")
          if "error" or "exception "  in fp:#It #should print all the content after error or #exception in line
             print line 
  </code></pre>