title: Make python code continue after exception
body: <p>I'm trying to read all files from a folder that matches a certain criteria. My program crashes once I have  an exception raised. I am trying to continue even if there's an exception but it still stops executing. </p>
  
  <p>This is what I  get after a couple of seconds. </p>
  
  <pre><code>error &lt;type 'exceptions.IOError'&gt;
  </code></pre>
  
  <p>Here's my code    </p>
  
  <pre><code>import os 
  path = 'Y:\\Files\\'
  listing = os.listdir(path)
  try:
      for infile in listing:
          if infile.startswith("ABC"):
              fo = open(infile,"r")
              for line in fo:
                  if line.startswith("REVIEW"):
                      print infile
              fo.close()
  except:
      print "error "+str(IOError)
      pass
  </code></pre>