Converts txtinfo format to python

def _txtinfo_to_python(self, data):
        """
        Converts txtinfo format to python
        """
        self._format = 'txtinfo'
        # find interesting section
        lines = data.split('\n')
        try:
            start = lines.index('Table: Topology') + 2
        except ValueError:
            raise ParserError('Unrecognized format')
        topology_lines = [line for line in lines[start:] if line]
        # convert to python list
        parsed_lines = []
        for line in topology_lines:
            values = line.split(' ')
            parsed_lines.append({
                'source': values[0],
                'target': values[1],
                'cost': float(values[4])
            })
        return parsed_lines