Did you know ... | Search Documentation: |
Interfacing to Python |
There are currently four interfaces to Python. Two use direct linking and two use network communication. These are
ctype
package.Janus is by far the most powerful of the alternatives. It is developed with the XSB and Ciao teams, creating a de-facto standard Python interface for several Prolog systems. Janus provides fast bi-directional calling between Prolog and Python. The SWI-Prolog version supports SWI-Prolog dicts, strings, unbounded integers, rational numbers and Prolog threads. The main disadvantage of Janus is that it relies on the SWI-Prolog and Python C embedding API. This implies that binaries of the interface are bound to a specific version of Python and SWI-Prolog.