diff options
author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2013-05-02 11:23:19 +0200 |
---|---|---|
committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2013-05-02 11:23:19 +0200 |
commit | bdbc2a580dd1c6064b665d6bbbc3bfff6f02c783 (patch) | |
tree | a071cfabe4a9ef3ff120f742c3bcf3f96817e510 /examples/prepared_query.py | |
parent | 557b1012bed875434001ca02be232159cd3b9d21 (diff) | |
download | rdflib-bdbc2a580dd1c6064b665d6bbbc3bfff6f02c783.tar.gz |
examples updates, some slice fixes
Diffstat (limited to 'examples/prepared_query.py')
-rw-r--r-- | examples/prepared_query.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/prepared_query.py b/examples/prepared_query.py index 808dd558..489ff6fc 100644 --- a/examples/prepared_query.py +++ b/examples/prepared_query.py @@ -16,10 +16,11 @@ initBindings keyword parameter import rdflib from rdflib.plugins.sparql import prepareQuery - +from rdflib.namespace import FOAF q = prepareQuery( - 'select ?s where { ?person <http://xmlns.com/foaf/0.1/knows> ?s .}') + 'SELECT ?s WHERE { ?person foaf:knows ?s .}', + initNs = { "foaf": FOAF }) g = rdflib.Graph() g.load("foaf.rdf") |