#!/usr/bin/env python3# "-* -编码: utf-8-* ' ' create_author:蛙鳖鹳狸猴create _ time 33602019-03-19 PPP ' ' importcodecsclasstsv (object ) : ' ' '.ts vfff file ) : ' ' tsv init. paramfile :tsvfiletohandle.' ' self.file=file def _ _ repr _ (self ) 33330 unr 3360 ' '.ts vfile ' scolumndefinitionanddatacheck. return : list.lines data from [ file ] rowbyrowindictformat.' ' ' utf-8 ' ) ASF : line=f.readline (data=[ ] head=[ ] while line 3360 if line.is space ) 3360 line=f.readline contone tobecompatiblebetweenoshead=line.RS trip ('r n ' ).split ) ) () ) () () ) ) 65 t ' ) line=f.readline (breakwhileline 3360 if line.is space ) : line=f ws=zip ) head,body ) tsv_DIC={}for ) head_sub,body_sub(inlist(rows ) : tsv _ DIC [ head _ su b ]=return data if _ _ name _=' _ _ main _ ' : with codecs.open (' tsv '、' w '、' utf-8 ' ) ASF 3360 rows=tcontent