def _txtinfo_to_python(self, data):
self._format = '<STR_LIT>'<EOL>lines = data.split('<STR_LIT:\n>')<EOL>try:<EOL><INDENT>start = lines.index('<STR_LIT>') + <NUM_LIT:2><EOL><DEDENT>except ValueError:<EOL><INDENT>raise ParserError('<STR_LIT>')<EOL><DEDENT>topology_lines = [line for line in lines[start:] if line]<EOL>parsed_lines = []<EOL>for line in topology_lines:<EOL><INDENT>values = line.split('<STR_LIT:U+0020>')<EOL>parsed_lines.append({<EOL>'<STR_LIT:source>': values[<NUM_LIT:0>],<EOL>'<STR_LIT:target>': values[<NUM_LIT:1>],<EOL>'<STR_LIT>': float(values[<NUM_LIT:4>])<EOL>})<EOL><DEDENT>return parsed_lines<EOL>
Converts txtinfo format to python