#-------------------------------------------------------------------------------------- #LOCATIONS locationsFile = open( PATH + LOCATION_FILE ) regex = re.compile(titleRegex + weirdShitRegex + splitRegex + '((.*, )*)(.*?)\s') for line in locationsFile: matches = regex.match(line) if(matches and matches.group(1) and not matches.group(2) and not matches.group(3)): try: if(matches.group(1) in titles): s.addLocation(matches.group(1), matches.group(6)) #print matches.group(1) + " SHOT IN " + matches.group(6) except: continue # print matches.group(1) + " ::: " + matches.group(6) #-------------------------------------------------------------------------------------- #RATINGS ratingsFile = open( PATH + RATING_FILE) re1 = re.compile('MV: ' + titleRegex + weirdShitRegex) re2 = re.compile('RE: Rated (.*?) ' ) for line in ratingsFile: movieMatch = re1.match(line)