diff options
Diffstat (limited to 'examples/python/query-sync.py')
-rwxr-xr-x | examples/python/query-sync.py | 9 |
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) |