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 exc
import os
path = 'C:\\'
listing = os.listdir(path)
for infile in listing:
try:
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)