How to pass file descriptor through dbus call in python

Z

Zhang, Zhenhua

Hi,
Hi,

DBus 1.3 supports passing file descriptor through dbus method call. So I am writing a python test case to verify my interface. Can someone answer my question: how to pass a file descriptor through python-dbus call? For example:

import os

m, s = os.openpty()

bus = dbus.SystemBus()
obj = dbus.Interface(bus.get_object('org.xxx', '/', interface)
obj.Create(m)

Python tells me that: org.freedesktop.DBus.Error.UnknowMethod: Method 'Create' with signature "i" on interface 'xxx' doesn't exist. Obviously it interprets 'm' as 'i' instead of 'h'.

Regards,
Zhenhua
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top