Installing
If you have SWI-Prolog installed, it's just:
pip install pyswip==v0.3.2
See PySwip Getting Started for detailed instructions.
Documentation
Find the documentation for this version here.
Changes
- The minimum required Python version is 3.9
- Introduced
pyswip.easy.module
function and deprecatedpyswip.easy.newModule
function. - Introduced
pyswip.prolog.Prolog.register_function
method and deprecatedpyswip.easy.registerForeign
function.
New Features
Python to Prolog Value Exchange via String Interpolation
Added support for value exchange from Python to Prolog using string interpolation in Prolog.assertz
, Prolog.asserta
, Prolog.retract
and Prolog.query
methods.
See the documentation on String Interpolation from Python to Prolog.
Example Modules
More information is in the Introducing the Examples Package note.