summaryrefslogtreecommitdiff
path: root/examples/prepared_query.py
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2013-05-02 11:23:19 +0200
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2013-05-02 11:23:19 +0200
commitbdbc2a580dd1c6064b665d6bbbc3bfff6f02c783 (patch)
treea071cfabe4a9ef3ff120f742c3bcf3f96817e510 /examples/prepared_query.py
parent557b1012bed875434001ca02be232159cd3b9d21 (diff)
downloadrdflib-bdbc2a580dd1c6064b665d6bbbc3bfff6f02c783.tar.gz
examples updates, some slice fixes
Diffstat (limited to 'examples/prepared_query.py')
-rw-r--r--examples/prepared_query.py5
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")