I have an issue with odfpy and Python 3. I try to copy an existing table in an Opendocument Text file. I'm failing at getting the style information out of the original table. Here is my code:
# templateTable is a table.Table that has to be copied
for childNode in templateTable.childNodes:
if 'style-name' in str(childNode.attributes):
# the next command fails and the python interpreter tells me
# 'style-name' is not in list
style = childNode.getAttribute('style-name')
Help is welcome!
I finally found a solution on my own. I would like to share it with you in case someone else has to work on the same problem as I had. You can find the code here.