diff options
Diffstat (limited to 'examples/python/query-async.py')
-rwxr-xr-x | examples/python/query-async.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/examples/python/query-async.py b/examples/python/query-async.py deleted file mode 100755 index 1077052dc..000000000 --- a/examples/python/query-async.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -import gi -from gi.repository import Tracker, GObject - -def results_ready_cb (obj, result, user_data): - cursor = obj.query_finish (result) - - # This can also be done asynchronously - while (cursor.next (None)): - print cursor.get_string (0) - - user_data.quit () - - -if __name__ == "__main__": - loop = GObject.MainLoop () - - # The connection can be requested asynchronously - conn = Tracker.SparqlConnection.get (None) - conn.query_async ("SELECT nie:url(?u) WHERE { ?u a nfo:FileDataObject }", - None, - results_ready_cb, - loop) - - loop.run () |