noxdafox / clipspy

Python CFFI bindings for the 'C' Language Integrated Production System CLIPS
BSD 3-Clause "New" or "Revised" License
177 stars 32 forks source link

How to do something like (watch activations) when loading rules from file? #64

Closed ForceConstant closed 1 month ago

ForceConstant commented 2 months ago

I see how you can add a watch for a construct created using the python library, but can't see how to do something like just globally set "(watch activations)" or rules, etc.

noxdafox commented 1 month ago

Hello,

I am not sure I understand the question.

You can indeed watch the activations via:

environment = clips.Environment()

environment.watch_activations = True

https://clipspy.readthedocs.io/en/latest/clips.html#clips.agenda.Rule.watch_activations