-
I bet, at least you have to try in case you want to make your application available as a package, isn't it? ;-)
F.
2009-10-01 21:22:53 UTC in PyCLIPS Python Module
-
Hi,
PyCLIPS is available in source form, I initially used to package some Linux binaries as a tarball but I gave up as it is not a standard way to distribute them. When setuptools became widely used, I also started to build egg packages, since this is quite easy to use. The binary Windows distribution was quite mandatory, because many Windows users do not have development tools available...
2009-10-01 20:51:08 UTC in PyCLIPS Python Module
-
Hi Tim,
I see what you mean. As a matter of method, you should consider that every rule matches a particular configuration. Saying this, I mean that a rule should be fired for each set of constraints that you want to analyse. Think it in this way: where in Python you can nest constraints via "if" clauses, in CLIPS you generally can't.
To reuse your example:
if self.age...
2009-08-12 22:24:01 UTC in PyCLIPS Python Module
-
Thank you Johan for helping Tim find the problem!
The point is that, be it an ordered fact or a template based fact, the fact has to be considered in its entirety when describing a rule: in the special case of a template based fact, there is an "extra slot" (the first one) called "relation" that has to be matched anyway, to identify the fact (actually its structure). Then...
2009-08-10 18:35:42 UTC in PyCLIPS Python Module
-
Hi,
since "seed" is a function in CLIPS, you can call it using PyCLIPS Eval() function: in your example, just do something like this:
>>> clips.Eval("(seed 1234)")
>>>
Please note all the parentheses. To directly issue CLIPS commands, no matter whether they are constructs or functions, you can use the clips.SendCommand() function.
HTH,
F.
2009-08-01 23:45:09 UTC in PyCLIPS Python Module