#NEWLINE# def __parse_line( self , line , record_type ) : #NEWLINE# #INDENT# defintions = getattr ( self , record_type ) #NEWLINE# record_data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for rule in defintions : #NEWLINE# #INDENT# value = line [ rule [ 'pos' ] : ( rule [ 'pos' ] + rule [ 'len' ] ) ] #NEWLINE# record_data [ rule [ 'field' ] ] = value #NEWLINE# #UNINDENT# return record_data