简体   繁体   中英

Auto-generate a interface implementation for a dbus interface in Python?

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 exported 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM