Outputting pyCLIPS Fact-base to a file

119 views Asked by At

Im using pyCLIPS and was curious if there was a way to output the entire contents of the fact-base into a new file for archiving results, analyzing past results with current ones, etc?

thanks in advance

1

There are 1 answers

0
Gary Riley On
>>> import clips
>>> clips.Assert("(color red)")
<Fact 'f-0': fact object at 0x10b29b3c0>
>>> clips.Assert("(color blue)")
<Fact 'f-1': fact object at 0x10af3eab0>
>>> clips.Assert("(color green)")
<Fact 'f-2': fact object at 0x10b29b420>
>>> clips.Eval("(save-facts facts.fct)")
<Symbol 'TRUE'>
>>>