Using a dbus service without opening it - python
Simon McVittie
simon.mcvittie at collabora.co.uk
Sun Apr 8 13:47:15 PDT 2007
On Sun, 08 Apr 2007 at 19:56:21 +0300, Tomer Haimovich wrote:
> I'm trying to write a python program which will tell me what the Listen
> music player is currently playing. I've written this code:
>
> import dbus
>
> bus = dbus.SessionBus()
> proxy_obj = bus.get_object( 'org.gnome.Listen', '/org/gnome/listen' )
>
> print proxy_obj.current_playing()
>
> It works well if Listen is already opened when the get_object method is
> called, but if Listen is not opened, the script will automatically open it.
D-Bus supports setting a flag for "if the app isn't running, don't start
it", but the high level parts of the Python bindings don't support it
yet. Could you please file a bug to remind me to fix that omission? I'll
be doing some more work on the D-Bus Python bindings in a week or two.
Thanks,
Simon
More information about the dbus
mailing list