Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SWI Namespace Reference


Detailed Description

-Prolog interface

This interface uses a pipe to talk to SWI-Prolog. It has no dependencies (other than SWI-Prolog and Python >= 2.3) and is not hard to use.

For the time being, it doesn't handle exceptional situations well. You'll have to send it the appropriate messages yourself via 'run_query_once' if you want to abort a failure loop, for instance. It is very usable, though, and will be improved.

Author: Jan-Ole Esleben 2004

Licensed under the LGPL. See file LICENSE for details.

Example: from prologpipe import PrologPipe l = PrologPipe('/usr/bin/pl -q -tty') l.run_query_once('A=2,B=b(A).') v = l.get_bindings() if l.get_result(): print v # [('A', '2'), ('B', 'b(2)')] l.finish()


Generated on Tue Jul 19 23:31:00 2005 for WoWi by  doxygen 1.3.9.1