Parsing RDF with python from Bill Kearney showing a small bit of code fragment (via Dan Connolly) that implements the question Bill had in his original RDF examples: who is secretly stalking Bob?. It's done using Daniel Krech's all-python rdflib in a hardly 20 lines of code.