title: Python Sparql Quering A Local File
body: <p>I have the following code which I use to print whole of my ontology. However, how can i perform some sparql with it, query  and then print the resulting graph?</p>
  
  <pre><code>g = Graph()
  g.parse('PLAYERS3.owl')
  for s,p,o in g:
      print s
  </code></pre>
  
  <p>Thanks</p>