import sys

from pyprolog.Modules import swipl

buf = """%  from 'Clause and Effect.'
a(g,h).
a(g,d).
a(e,d).
a(h,f).
a(e,f).
a(a,e).
a(a,b).
a(b,f).
a(b,c).
a(f,c).

path(X,X) :- 
    !.
path(X,Y) :- 
    a(X,Z), path(Z,Y).
"""

s = swipl.new_term()
s.put_string(buf)

print s
print
print dir(s)
