This project looks very useful (thank you!), but I couldn’t make it work.
pip install dbus-python-client-gen was successful, then import dbus_python_client_gen (I guessed that one), but then
dbus_python_client_gen.make_class('Klass', 'DisplayConfig.xml')
(with the xml file downloaded from here) says:
File "…/lib/python3.11/site-packages/dbus_python_client_gen/_invokers.py", line 412, in make_class
interface_name = spec.attrib["name"]
AttributeError: 'str' object has no attribute 'attrib'
I cannot find what kind of object is expected for spec.
I tried import xml.etree.ElementTree as ET then spec = ET.parse('DisplayConfig.xml'), and alternatively spec = ET.parse('DisplayConfig.xml').getroot(), to no avail.
This project looks very useful (thank you!), but I couldn’t make it work.
pip install dbus-python-client-genwas successful, thenimport dbus_python_client_gen(I guessed that one), but then(with the xml file downloaded from here) says:
I cannot find what kind of object is expected for
spec.I tried
import xml.etree.ElementTree as ETthenspec = ET.parse('DisplayConfig.xml'), and alternativelyspec = ET.parse('DisplayConfig.xml').getroot(), to no avail.