Using a dbus service without opening it - python
tomer.ha at gmail.com
Sun Apr 8 14:15:47 PDT 2007
Oh, and meanwhile, is there any other way to avoid this problem? I just
figured out that even if you do add this feature, it won't be here until the
next release, and I don't know when it will happen.
Maybe I can check with ps, and then call sleep() so I'll give Listen time
for initializing its dbus manager?
2007/4/8, Simon McVittie <simon.mcvittie at collabora.co.uk>:
> 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
> 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.
> dbus mailing list
> dbus at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus