title: In Python: check if file modification time is older than a specific datetime
body: <p>I wrote this code in c# to check if a file is out of date:</p>
  
  <pre><code> DateTime? lastTimeModified = file.getLastTimeModified();
          if (!lastTimeModified.HasValue)
          {
              //File does not exist, so it is out of date
              return true;
          }
          if (lastTimeModified.Value &lt; DateTime.Now.AddMinutes(-synchIntervall))
          {
              return true;
          } else
          {
             return false;
          }
  </code></pre>
  
  <p>How do I write this in python?</p>
  
  <p>I tried this in python.</p>
  
  <pre><code>statbuf = os.stat(filename)
  if(statbuf.st_mtime &lt; datetime.datetime.now() - self.synchIntervall):
      return True
   else:
      return False
  </code></pre>
  
  <p>I got the following exception</p>
  
  <pre><code>message str: unsupported operand type(s) for -: 'datetime.datetime' and 'int'   
  </code></pre>