This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/example.py

15 lines
242 B
Python

# python commands
import yap
engine = yap.YAPEngine();
# engine = yap.YAPEngine(yap.YAPParams());
while True:
s = raw_input("Prolog Query: ")
q = engine.query(s)
print "success"
while q.next():
ar = q.namedVars();
print ar