/prolog_call_python

call python function from prolog code

Primary LanguageProlog

How to use

Import module

user:file_search_path(library, '../prolog_call_python').
:- use_module(library(python_lib)).

Example

run hello_world.py and call Result = say_hello()

?- python_call('hello_world', 'say_hello', Result).
Result = hello.

run hello_world.py and call Result = say('good')

?- python_call('hello_world', 'say', 'good', Result).
Result = good.