Mailing List Archive

Prolog module
Hi,

I am new to Python Programming (just did the tutorial and played
a little with it). It is really a great language!

I have seen that Python can interact with other languages. My question
is: can Python access a Prolog kernel? Or even, is there a module that
implements in Python a Prolog kernel? (in the same way one can use
Java from Python).

Thanks.
--
---------------------------------------------
Jordi INGLADA
Departement ITI - ENST Bretagne
BP 832 - 29285 Brest Cedex - FRANCE
Tel. +33 (0)2 98 00 13 55 / 10 62
http://www-iti.enst-bretagne.fr/~inglada/

"Computers are like air conditioners: they stop working properly when you open Windows"
"Linux, parce que je le vaux bien..."
Prolog module [ In reply to ]
Jordi Inglada <jordi.inglada@enst-bretagne.fr> writes:

> Hi,
>
> I am new to Python Programming (just did the tutorial and played
> a little with it). It is really a great language!
>
> I have seen that Python can interact with other languages. My question
> is: can Python access a Prolog kernel?

Sure. (Actually, I have been thinking of implementing a simple Prolog
kernel *in* Python... But that might be far into the future... :) You
could either wrap the Prolog kernel with swig (a tool for interfacing
between c-programs/modules and scripting languages) or you could check
out pyexpect which lets you interact with command-line programs (like
a Prolog interpreter) programmatically.

> Or even, is there a module that
> implements in Python a Prolog kernel? (in the same way one can use
> Java from Python).
>
> Thanks.

--

Magnus Making no sound / Yet smouldering with passion
Lie The firefly is still sadder / Than the moaning insect
Hetland : Minamoto Shigeyuki