title: Why is Python script reading files much faster the second run?
body: <p>I read the first line of a couple hundred text files with Python.<br>
  This runs under a couple seconds on the first time, but it takes only milliseconds to run the second time!!<br>
  Why is that ? Is it python ? Is it the operating system (Windows 7 in my case) ?</p>
  
  <p>Here is the script:</p>
  
  <pre><code>import glob
  from datetime import datetime
  
  start = datetime.now()
  
  for summary in glob.glob(r"C:\folder\*.txt"):
      with open(summary) as f:
          line = f.readline()
          print line.rstrip().decode('utf-16')
  
  print 'Time: ', datetime.now()-start
  </code></pre>