title: Parse text from a .txt file using csv module
body: <p>I have an email that comes in everyday and the format of the email is always the same except some of the data is different. I wrote a VBA Macro that exports the email to a text file. Now that it is a text file I want to parse the data so that I get only the new information. </p>
  
  <p>The format of email is like this</p>
  
  <pre><code>&gt; Irrelevant data  
  &gt; Irrelevant data
  &gt; Type:     YUK
  &gt; Status:   OPEN
  &gt; Date:     6/22/2015
  &gt; Description: ----
  &gt; 
  &gt; Description blah blah blah
  &gt; Thank you
  </code></pre>
  
  <p>I want to capture the relevant data. For example, in this case i would like to only capture YUK, OPEN, 6/22/2015 and the Description blah blah blah. I tried using the csv module to go line by line and print out the lines but i cant seem to find a way to parse that information.</p>
  
  <p>This is what I have so far. it only prints out the lines though.</p>
  
  <pre><code>import os
  import glob
  import csv
  
  path = "emailtxt/"
  glob = max(glob.iglob(path + '*.txt'), key=os.path.getctime)#most recent file located in the emailtxt
  newestFile = os.path.basename(glob)#removes the emailtxt\ from its name
  
  f = open(path+newestFile)
  
  read = csv.reader(f)
  for row in read:
      print row
  
  f.close()
  </code></pre>
  
  <p>How would I parse through the text file? </p>