PySWIP

Software Screenshot:
PySWIP
Software Details:
Version: 0.2.2
Upload Date: 2 Jun 15
Developer: Yuce Tekol
Distribution Type: Freeware
Downloads: 21

Rating: nan/5 (Total Votes: 0)

PySWIP application is a Python/SWI-Prolog bridge that enables you to query in prolog using SWI-Prolog in your Python programs.

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.

Installation:

PySWIP should work on Win32 systems, but this isn't tested. The instructions below are for POSIX systems.

+ First of all, you need to have SWI-Prolog's libpl as a shared library, e.g., ``libpl.so``, ``libpl.so.5.6.34``, etc. SWI-Prolog isn't compiled by default to enable shared library, so you need to compile it yourself with shared library production enabled. Please see ``INSTALL`` of this package.

+ Install a recent version of `ctypes` if you don't have it already (if you have Python 2.5 you don't need to install it seperately).

+ PySWIP supports distutils, so after the previous steps are satisfied, just do: `python setup.py install`.

+ To test, do the following at the shell::

$ python
[ ... python info ...]
>>> from pyswip.util import PrologRunner
>>> prolog = PrologRunner()
>>> prolog.query("assertz(father(michael,john))")
[{}]

If you get an error, such as "libpl (shared) not found." or "FATAL ERROR: Resource not found" be sure you have installed SWI-Prolog as a share library. Check your default library directory (usually ``/usr/lib``) for ``libpl.so``.

What's New in This Release:

· 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.

Similar Software

Texai
Texai

3 Jun 15

Cypher
Cypher

2 Jun 15

RebeccaAIML
RebeccaAIML

3 Jun 15

Comments to PySWIP

Comments not found
Add Comment
Turn on images!