开发者

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

开发者 https://www.devze.com 2023-02-13 14:45 出处:网络
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 wo

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消