INNER CODE UNIT · Python
get_files_to_process
crocs-muni/JCAlgTest · AlgTest_Process/process_results.py:48
def get_files_to_process(walk_dir: Path, required_extension: str):
files_to_process = []
for file_name in search_files(walk_dir):
if not os.path.isfile(file_name):
continue
file_ext = file_name[file_name.rfind('.'):]
if file_ext.lower() != required_extension:
continue
files_to_process.append(file_name)
return files_to_process
def extract_section(lines: list, start_string: str, perf_measurement: bool):
all_sections = []
i = 0
while i < len(lines):
if lines[i].startswith(start_string): # detect start of the section to extract