Project

General

Profile

« Previous | Next » 

Revision 5570

csvs.py: Added ColCtFilter, which gives all rows the same # columns

View differences:

lib/csvs.py
138 138
    def __init__(self, reader):
139 139
        def filter_(row): return [v.strip() for v in row]
140 140
        Filter.__init__(self, filter_, reader)
141

  
142
class ColCtFilter(Filter):
143
    '''Gives all rows the same # columns'''
144
    def __init__(self, reader, cols_ct):
145
        def filter_(row): return util.list_as_length(row, cols_ct)
146
        Filter.__init__(self, filter_, reader)

Also available in: Unified diff