Open deRemo opened 9 months ago
Had the same problem. It seems that the Prolog() object is a singleton and so it is created in the module level. However I have seen that pywip_notebook creates a wrapper around the Prolog class so it creates the Prolog instance in its own module. I am trying with this.
I'm using pyswip in a python script very similar to this one:
The consulted files include a 'global' pl file shared by everyone. I'm encountering this problem when
len(plpaths) > 1
:I tried cleaning up the prolog variable (
prolog = None
anddel prolog
), but didn't work. I tried re-importing the module at each iteration, but nothing. Is there a fix for this?