Re: CLI interface in the works, anyone interested?



On 2010-03-07 22:51, Gabriel Filion wrote:
> On 2010-03-07 17:55, Debarshi Ray wrote:
>>> How would you suggest to do the detection? look for the presence of both
>>> binaries in PATH and choose automatically if only one of them is available?
>>
>> Check for the presence of their DBus services[...] What do
>> you think?

I dug around the dbus-python API and here's what I found for this:

With the SessionBus instance called session_bus: calling
session_bus.get_object raises a DBusException if the object name does
not correspond to an existing application object.

So, for detection, we could call get_object for both tomboy and gnote,
verify if they raise an exception and base our guess on this.
Does anyone know enough about dbus to confirm that doing this is a sane
thing way to use get_note?

-- 
Gabriel Filion


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]