def replace_lines_in_files(search_string, replacement_line):
<EOL>paths = _s.dialogs.MultipleFiles('<STR_LIT>')<EOL>if paths == []: return<EOL>for path in paths:<EOL><INDENT>_shutil.copy(path, path+"<STR_LIT>")<EOL>lines = read_lines(path)<EOL>for n in range(<NUM_LIT:0>,len(lines)):<EOL><INDENT>if lines[n].find(search_string) >= <NUM_LIT:0>:<EOL><INDENT>print(lines[n])<EOL>lines[n] = replacement_line.strip() + "<STR_LIT:\n>"<EOL><DEDENT><DEDENT>write_to_file(path, join(lines, '<STR_LIT>'))<EOL><DEDENT>return<EOL>
Finds lines containing the search string and replaces the whole line with
the specified replacement string.