def parse_psimitab(content, fmt='<STR_LIT>'):
columns = [<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>']<EOL>columns += [<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>]<EOL>if fmt == '<STR_LIT>':<EOL><INDENT>columns = columns[: <NUM_LIT:15>]<EOL><DEDENT>rexp = re.compile(r"<STR_LIT>")<EOL>retval = []<EOL>for line in content.split('<STR_LIT:\n>'):<EOL><INDENT>line = line.strip()<EOL>if line == '<STR_LIT>' or line[<NUM_LIT:0>] == '<STR_LIT:#>':<EOL><INDENT>continue<EOL><DEDENT>start = <NUM_LIT:0><EOL>tmp = []<EOL>for mobj in rexp.finditer(line):<EOL><INDENT>if mobj.start() != start:<EOL><INDENT>print(repr(line))<EOL><DEDENT>assert mobj.start() == start<EOL>start = mobj.end()<EOL>tmp.append(mobj.group('<STR_LIT>'))<EOL><DEDENT>assert len(tmp) == len(columns)<EOL>retval.append(dict(zip(columns, tmp)))<EOL><DEDENT>return retval<EOL>
https://code.google.com/archive/p/psimi/wikis/PsimiTab27Format.wiki