title: How can i receive events from Skype via D-Bus using python?
body: <p>(i know this resembles <a href="https://stackoverflow.com/questions/4125393/python-and-d-bus-how-to-set-up-main-loop">Python and d-bus: How to set up main loop?</a> , but without complete code in the "Answer", i'm unable to figure out where i'm going wrong. it might just be a change in a Skype)</p>
  
  <p>Here is my program:</p>
  
  <pre><code>import gobject
  import dbus
  import dbus.mainloop.glib
  dbus_gmainloop = dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
  sessbus = dbus.SessionBus()
  skype = sessbus.get_object('com.Skype.API', '/com/Skype')
  skypec = sessbus.get_object('com.Skype.API', '/com/Skype/Client')
  skype_iface = dbus.Interface(skype, dbus_interface='com.Skype.API')
  skype_iface.Invoke("NAME py1")
  # ... waits for user click in Skype ...
  #==&gt; dbus.String(u'OK')
  skype_iface.Invoke("PROTOCOL 7")
  #==&gt; dbus.String(u'PROTOCOL 7')
  def got_signal(sender, destination, member, interface, path):
    print "got_signal(sender=%s, dest=%s, member=%s, iface=%s, path=%s)" \
      % (sender, destination, member, interface, path)
  
  skypec.connect_to_signal('Notify', got_signal, sender_keyword='sender', \
    destination_keyword='destination', member_keyword='member', \
    interface_keyword='interface', path_keyword='path')
  
  mainloop = gobject.MainLoop()
  mainloop.run()
  </code></pre>
  
  <p>When run (e.g. <code>python skype-call.py</code>), it pauses after sending the <code>NAME py1</code> command to Skype and waits for an interactive confirmation in the Skype UI, then continues. As such, the <code>skype_iface</code> object is clearly working at least to a certain degree.</p>
  
  <p>However, python then emits the following error:</p>
  
  <pre><code>ERROR:dbus.proxies:Introspect error on :1.152:/com/Skype/Client: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: No such object path '/com/Skype/Client'
  </code></pre>
  
  <p>I also tried the following (instead of <code>connect_to_signal</code>, just before starting the gobject mainloop at the end):</p>
  
  <pre><code>def receiver(x, **kwargs):
    print "receiver(%s)" % (x,)
  
  sessbus.add_signal_receiver(receiver, signal_name='Notify', \
    dbus_interface='com.Skype.API', bus_name='com.Skype.API', path='/com/Skype/Client')
  </code></pre>
  
  <p>And while that didn't complain, it never gets called. I tried sending the Skype user a message. What sorts of events should trigger it?</p>
  
  <p>The docs at <a href="https://dev.skype.com/desktop-api-reference#DBUSUsage" rel="nofollow noreferrer">https://dev.skype.com/desktop-api-reference#DBUSUsage</a> aren't terribly helpful.</p>
  
  <p>This is Skype for Linux 4.2.0.11 on Debian 7.0 multiarch (amd64/i386).</p>