PySWIP is a Python/SWI-Prolog bridge that enables you to query in prolog using SWI-Prolog in your Python programs. It includes both a SWI-Prolog foreign language interface and a utility class that makes it easy to query with SWI-Python. Since it uses SWI-Prolog as a shared library and ctypes to access it, it doesn't require compilation to be installed.
|Tags||Software Development Libraries Python Modules Scientific/Engineering Artificial Intelligence|
|Operating Systems||OS Independent|
Release Notes: PySWIP won't rely on the (id of the) functor handle of "=/2". A patch to allow PySWIP to work on Mac OS X was incorporated.
Release Notes: Importing 'pyswip' automatically initializes SWI-Prolog. A bug with querying lists with the new interface was fixed.
Release Notes: This release introduces a new 'Pythonic' interface. Prolog.query now returns real Python data types and foreign functions get values as Python data types. A Sudoku Solver was included.
Release Notes: This release adds a new module to use SWI-Prolog FFI more easily. Starting with this release, it is possible to register a Python function as a Prolog predicate through SWI-Prolog's FFI. The core module has been improved. A few example programs have been added to demonstrate registering foreign functions, including a "Towers of Hanoi" solver.
Release Notes: PrologRunner was renamed to Prolog. The query method of Prolog was removed, and queryGenerator was renamed to query. asserta, assertz, and consult methods were added to Prolog. The necessary cleanup is done even if the query generator doesn't run to the end. Errors during the execution of a query are caught and PrologError is raised. Many new additions were made to the core library. An examples directory was added. The examples "coins" and "draughts" were added. A Windows installer was added.