diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2020-11-22 22:09:15 +0100 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2020-12-17 16:27:07 +0100 |
commit | 98585df9d00a9e57cf6687a56c001ad455f68256 (patch) | |
tree | 9205c56698715465751276b12ecf6c64cbd1c9ca /examples | |
parent | a06e0404d5b950db8c9fcfc1c0b472ccda799761 (diff) | |
download | tracker-98585df9d00a9e57cf6687a56c001ad455f68256.tar.gz |
examples: Remove all-async.py query
It's not clear how this is different from query-async.py.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/python/all-async.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/examples/python/all-async.py b/examples/python/all-async.py deleted file mode 100755 index 70a3b2b1f..000000000 --- a/examples/python/all-async.py +++ /dev/null @@ -1,30 +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 () - -def connection_ready_cb (object, result, user_data): - assert user_data - conn = Tracker.SparqlConnection.get_finish (result) - - conn.query_async ("SELECT ?u WHERE { ?u a nie:InformationElement. }", - None, - results_ready_cb, - user_data) - - -if __name__ == "__main__": - loop = GObject.MainLoop () - - Tracker.SparqlConnection.get_async (None, connection_ready_cb, loop) - - loop.run () |