PySWIP 0.1.1 Released

yucetekol at gmail.com yucetekol at gmail.com
Sun May 27 14:22:44 CEST 2007


I am pleased to announce the 0.1.1 version of PySWIP.

PySWIP is a GPL'd Python/SWI-Prolog bridge enabling to query SWI-
Prolog in your Python programs.

Example:

>>> from pyswip.util import PrologRunner
>>> prolog = PrologRunner()
>>> prolog.query("assertz(father(michael,john)).")
[{}]
>>> prolog.query("assertz(father(michael,gina)).")
[{}]
>>> prolog.query("father(michael,X).")
[{'X': 'john'}, {'X': 'gina'}]
>>> for soln in prolog.queryGenerator("father(X,Y)."):
...     print soln["X"], "is the father of", soln["Y"]
...
michael is the father of john
michael is the father of gina

Requirements:

    * Python 2.3 and higher (most probably other versions will also
work).
    * ctypes 0.9.9.9 and higher (most probably other versions will
also work).
    * SWI-Prolog 5.6.x and higher(most probably other versions will
also work).
    * libpl as a shared library.
    * Tested only on Linux, should be working for other POSIX and
Win32.

This release adds the `queryGenerator` to `PrologRunner` and the
`examples` directory with a program that solves the classic "SEND
+MORE=MONEY" problem.

PySWIP homepages is at: http://code.google.com/p/pyswip
Direct link for download: http://pyswip.googlecode.com/files/pyswip-0.1.1.tar.gz

Regards,

Yuce Tekol



More information about the Python-announce-list mailing list