:py:mod:`expliot.core.common.fileutils` ======================================= .. py:module:: expliot.core.common.fileutils .. autoapi-nested-parse:: Helper for handling files. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: expliot.core.common.fileutils.readlines expliot.core.common.fileutils.readlines_both .. py:function:: readlines(file) Helper method for reading one line at a time from a file and yielding it for loops. The file is closed automatically even if the caller exits the loop early (break, exception, etc). :param file: The file to read data from. :return: yield a line in a loop .. py:function:: readlines_both(file1, file2) Helper method for reading one line at a time from two files and yielding them for loops. For each line in file1 it will also loop through all lines of file2. Total no. of yields is lines in file1 x lines in file2. The files are closed automatically even if the caller exits the loop early (break, exception, etc). :param file1: The first file to read data from :param file2: The second file to read data from :return: