How to pass file descriptor through dbus call in python

Discussion in 'Python' started by Zhang, Zhenhua, May 12, 2010.

  1. 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
    Zhang, Zhenhua, May 12, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kj.kjn
    Replies:
    2
    Views:
    317
    Pierre Schnizer
    Jul 3, 2003
  2. bob
    Replies:
    1
    Views:
    273
  3. bob
    Replies:
    0
    Views:
    286
  4. bob
    Replies:
    1
    Views:
    663
    alisonken1
    Jul 29, 2006
  5. est

    dbus-python for windows

    est, Jan 2, 2008, in forum: Python
    Replies:
    4
    Views:
    735
Loading...

Share This Page