summaryrefslogtreecommitdiff
path: root/examples/python/query-sync.py
diff options
context:
space:
mode:
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)