title: Check if file line sttime is older than 2 days - Python
body: <p>I have a series of entries in a text file like this:</p>
  
  <pre><code>20150217_00:47:32 - AAAAAA
  20150217_00:47:32 - BBBBBB
  20150217_00:47:32 - CCCCCC
  </code></pre>
  
  <p>I want to make a function that will periodically read each line in the file and do something depending on whether the entry is less than 2 days old, more than 2 days old, or more than 7 days old.</p>
  
  <p>I'm not sure how to get the code to understand the sttime timestamp in the file though. My code (so far) is as follows:</p>
  
  <pre><code>with open('entries.txt', 'r+') as entries:
          for line in entries:
              lineitem = line.strip()
              print lineitem[:17]
  </code></pre>
  
  <p>That retrieves the timestamps ok, but how to read them and interpret them as times I have no idea :/</p>
  
  <p>(This will end up in an if loop eventually that does the function described above, but first I just need to know how to read those times...)</p>