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
Raw Normal View History

2015-09-21 23:05:36 +01:00
# 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