Open pampelmuse76 opened 3 years ago
Did you try: prolog.query("f(X)", catcherrors=False) ?
On Mon, Dec 28, 2020 at 8:04 AM pampelmuse76 notifications@github.com wrote:
A python program, which does not determine in the prolog part, cannot be stopped by entering Ctrl-C.
!/usr/bin/python
from pyswip import Prolog prolog = Prolog() prolog.assertz(""" f(X) :- X #> 0, f(X) """) for result in prolog.query("f(X)"): print(result["X"])
Python 3.9.1 pyswip 0.2.10 SWI-Prolog version 8.2.3 for x86_64-linux
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yuce/pyswip/issues/115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3QJLFYXPP4OFDC4NYWZRDSXCUCHANCNFSM4VMGBDLQ .
Yes, with catcherrors=False and catcherrors=True. Neither works.
Sending a kill signal (TERM) to the process id is working (it determines the program)
A python program, which does not determine in the prolog part, cannot be stopped by entering Ctrl-C.
!/usr/bin/python
from pyswip import Prolog prolog = Prolog() prolog.assertz(""" f(X) :- X #> 0, f(X) """) for result in prolog.query("f(X)"): print(result["X"])
Python 3.9.1 pyswip 0.2.10 SWI-Prolog version 8.2.3 for x86_64-linux