Calling Prolog from Python
Updated 09 Oct 2002
Upper levels:
Amzi Python Interface 0.2...
4. Manual

 4.1. Calling Prolog from Python

 [ Prev - Up - Next ] 

This is done with the engine methods:

.run(<query>)
Returns first answer, no backtracking.
.call(<query>)
Returns first answer, allows backtracking
.redo()
Backtracks from previous .call().
.calls(<query>)
Returns an iterator for use in for-loops
which have are already discussed in the 'Use' section. The query can be a string, an AmziTerm (an Amzi TERM object wrapped in a Python object), or a tuple representing a term, as described in 'Building'.


 [ Prev - Top - Next ]