(license_file)
Iterate over the rows of a `3rdparty-extra-LICENSE.csv` or `LICENSE-3rdparty.csv` file.
Iterate over the rows of a `3rdparty-extra-LICENSE.csv` or `LICENSE-3rdparty.csv` file.
Iterate over the rows of a 3rdparty - extra - LICENSE . csv or LICENSE - 3rdparty . csv file .
def read_license_file_rows(license_file):
    """
    Iterate over the rows of a `3rdparty-extra-LICENSE.csv` or `LICENSE-3rdparty.csv` file.
    """
    with io.open(license_file, 'r', encoding='utf-8') as f:
        lines = f.readlines()
        f.seek(0)
        reader = csv.DictReader(f, delimiter=',')

        # Read header
        reader._fieldnames = reader.fieldnames

        for line_no, row in enumerate(reader, 2):
            # return the original line because it will be needed to append to the original file
            line = lines[line_no - 1]
            yield line_no, row, line
def read_license_file_rows ( license_file ) : with io . open ( license_file , 'r' , encoding = 'utf-8' ) as f : lines = f . readlines ( ) f . seek ( 0 ) reader = csv . DictReader ( f , delimiter = ',' ) # Read header reader . _fieldnames = reader . fieldnames for line_no , row in enumerate ( reader , 2 ) : # return the original line because it will be needed to append to the original file line = lines [ line_no - 1 ] yield line_no , row , line