I re-wrote the FiloeSearch method like this:
def FileSearch(fileName,pattern): name_line = "" time_line = "" place_line = "" name, time, place = None; with open(fileName, "r+") as f: for line in f.readlines(): name_line = re.search(pattern,lines) time_line = re.search("^time",lines) place_line = re.search("^[place]",lines) st = str.split(line,":") if name_line: name = st[1] if time_line: time = st[1] if place_line: place = st[1] ##### I am not sure what you are doing here.... but your table only has 3 headings and you are sending 4 values back so I think you can get rid of the line number stuff ### f.close(); done automatically by using with open() return(name, time, place)You have 4 values being returned but are only using 3 of them. What results are you getting back when you run your code?