开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜