AttributeError:类Prolog没有属性'dynamic'

时间:2017-12-18 09:20:05

标签: python swi-prolog

我在ubuntu上安装了 pyswip ,我按照官方文档进行操作。但是,我仍然遇到一些问题,我找到了一些解决办法,我还在为更多人而战。

以下是我目前获得的代码和错误:

>>> from pyswip import Prolog, registerForeign, Variable, Functor
>>> registerForeign(ask_question,name='ask', arity=1)
1
>>> hypothesize = Functor("hypothesize",1)
>>> Test = Variable()
>>> assertz = Functor('assertz',1)
>>> Prolog.dynamic("yes/1, no/1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: class Prolog has no attribute 'dynamic'

有什么想法?谢谢!

0 个答案:

没有答案