pyknow icon indicating copy to clipboard operation
pyknow copied to clipboard

Return of value

Open Duo90 opened this issue 5 years ago • 2 comments

Hi Buguroo,

Now I am using Pyknow to do a calculation, and can i ask how to return a value out of pyknow so I can use as part of web application?

Current only print is working.

Thanks

Duo90 avatar Mar 03 '19 09:03 Duo90

+1 was this ever fixed? what use cases does PyKnow serve if only printing is possible?

juggieram avatar Apr 13 '19 00:04 juggieram

Hi, I have found there are a couple of ways to get a value out, You can construct a class which inherits the knowledge engine, you can than have a variable which you set within the knowledge base and then read after running the knowledge engine. Or, alternatively you can use the standard library queue and put messages onto it during the execution of the rules.

8ball030 avatar Apr 13 '19 15:04 8ball030