Are there any tools that can read a set of DBus XML files and create a set of representative Python classes? Any embedded code generated for catching related events & initialising the interface would also be a benefit.
Currently the project I am working on is duplicating loads of lines of code from a large export开发者_StackOverflow中文版ed api. Such a tool would be invaluable.
Take a look at the code generation tools in telepathy-python. Telepathy's spec XML format is a superset of the standard D-Bus introspection format; you should be able to feed plain-ish introspection XML, possibly with a few extra annotations, to those tools.
精彩评论