pyswip icon indicating copy to clipboard operation
pyswip copied to clipboard

use_module support

Open LyzardKing opened this issue 4 years ago • 1 comments
trafficstars

Hi @yuce Is it possible to add modules (via use_module)? As I would do in prolog: :- use_module('module', [ predicate/2 as new_predicate ]).

LyzardKing avatar Feb 16 '21 09:02 LyzardKing

Have you tried:

module_name = 'foo'
prolog.query(f"use_module(library({module_name}),[])")

allComputableThings avatar Feb 19 '21 22:02 allComputableThings