I want to parse an SVG file using python to extract coordinates/paths (I believe this is listed under the \"path\" ID, specifically the d=\"...\"/>). This data will eventua
Getting the d-string can be done in a line or two using svgpathtools.
from svgpathtools import svg2paths
paths, attributes = svg2paths('some_svg_file.svg')
paths is a list of svgpathtools Path objects (containing just the curve info, no colors, styles, etc.). attributes is a list of corresponding dictionary objects storing the attributes of each path.
To, say, print out the d-strings then...
for k, v in enumerate(attributes):
print v['d'] # print d-string of k-th path in SVG