I am using python and Clips to solve an issue, here is what I am trying to do:
I am looking to load a .clp file from python and run it. I need to add facts based off a database as well. So the .clp file will have rules in it and I am using
clips.Load("myfile.clp")
to load my file. I am stuck on how to assert facts now into clips. I also have a varable final in clips that will store what it comes out with based on the facts. I need to bring that back to python to run other code.
Thanks
I assume you are using PyCLIPS.
test.clp
looks something like:I included the
@clips_callable
decorator as a bonus, which makes it very easy to call a python function from clips.