Re: Python hookup to beagle for querying indexed data



Jon--

Okay, got the connection and the path to server side query instance. 
Now I'm having troubles with listening for HitsAddedAsBinaryEvevn (?)
and getting:

dbus_bindings.DBusException: Member name
'com.novell.Beagle.Factory.HitsAddedAsBinaryEvent' is invalid

I've tried many definitions for the "signal" such as the path returned
by the NewQueryPath remote service, etc. without any success and the
same error message.  The block of code I'm using follows:

def _doQuery (interface, signal_name, service, path, message):
    print "Received signal %s from %s" % (signal_name, interface)

my_bus=dbus.Bus (dbus.Bus.TYPE_SESSION)
beagle_svc=my_bus.get_service ("com.novell.Beagle")
beagle_obj=beagle_svc.get_object (
    "/com/novell/Beagle/Factory",
    "com.novell.Beagle.Factory"
)
query_path=beagle_obj.NewQueryPath ()
query_svc=string.lstrip (string.replace (query_path, '/', '.'), '.')

my_bus.add_signal_receiver (_doQuery,
                            'com.novell.Beagle.Factory.HitsAddedAsBinaryEvent',
                            None, None,
                            '/com/novell/Beagle/Factory')


query_obj=beagle_svc.get_object (query_path, query_svc)
query_resp=query_obj.AddText (my_string)

gtk.main ()



-- 
----------------------------------------------------------------------
Michael C. Hay



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