This is really helpful, thanks. I realize now my question was a bit vague but I was looking for the functionality of elem.attrib, which lists the SVG attributes.
However, your response has really helped me better understand what is possible with each element as your function reveals all the object's attributes and methods. I struggled finding the necessary information in the reference documentation before as I was unsure what type of the element I was dealing with. Using the python attributes listing, using dir(), really helps.
If I have a selected element, perhaps retrieved using:
for elem in self.svg.selection:
# what can I find out about the elem?
What can I find out about the elem, potentially without querying all possible attributes?
I can for example:
What other information can we get?
Is there a way of listing all the attributes of the element?
The api reference is here: https://inkscape.gitlab.io/extensions/documentation/source/index.html
However for a general python method to do it:
Where self is any object you want to feed in.
Hi inklinea,
This is really helpful, thanks.
I realize now my question was a bit vague but I was looking for the functionality of elem.attrib, which lists the SVG attributes.
However, your response has really helped me better understand what is possible with each element as your function reveals all the object's attributes and methods.
I struggled finding the necessary information in the reference documentation before as I was unsure what type of the element I was dealing with.
Using the python attributes listing, using dir(), really helps.
Thanks for your help!