I have searched trough many answers on this site but none are working for me. I want to overwrite the print within this loop every time it loops:
for searchedfile in searchedfiles:
print ("Searching Files:", searchedfile)
with open(searchedfile) as f_in, open(outfilecamera, 'a') as f_out:
f_out.writelines(searchedfile)
f_out.writelines(ii)
matched_lines = list(line for line in f_in if "timeout of" in line)
f_out.writelines(matched_lines)
for line in searchedfile.split("\n"):
if "Cycle " in line:
cycleno = line.split("#")[-1].split(".log")[0]
file_counts.append((cycleno,len(matched_lines)))
I have tried various things including "\r" but i cannot seem to get it right.
Thanks