summaryrefslogtreecommitdiff
path: root/examples/python/query-sync.py
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2020-11-22 21:48:02 +0100
committerSam Thursfield <sam@afuera.me.uk>2020-12-17 16:27:07 +0100
commitfbb61baf515b78b6f8246335fb2d9b077a29ee1d (patch)
tree6738228dd987d5b9e5ca128bd839bb9e8ab23529 /examples/python/query-sync.py
parentfa90c5a92d199528755d40fb7302b9c55c56e53c (diff)
downloadtracker-fbb61baf515b78b6f8246335fb2d9b077a29ee1d.tar.gz
examples: Rename `introspection/python` -> `python`
Diffstat (limited to 'examples/python/query-sync.py')
-rwxr-xr-xexamples/python/query-sync.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/python/query-sync.py b/examples/python/query-sync.py
new file mode 100755
index 000000000..cf8bfd6f6
--- /dev/null
+++ b/examples/python/query-sync.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+import gi
+from gi.repository import Tracker
+
+conn = Tracker.SparqlConnection.get (None)
+cursor = conn.query ("SELECT ?u WHERE { ?u a nie:InformationElement. }", None)
+
+while (cursor.next (None)):
+ print cursor.get_string (0)