> def getlog(activity,type,endtype): > log = open("Multivert_Log.txt","r") > for line in log.readlines(): > ac = re.compile(activity) This creates an re object so you want to call the findall method of the ac object > fac = re.findall(ac, line) So this becomes fac = ac.findall(line) Same with the ty and ex bits further down. Alan G.