24 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
48
views
Sublime text 4 plugin development: memory copy problem
I am creating a plugin for sublime 4 on Ubuntu 22.04. The plugin uses pyclip (https://pypi.org/project/pyclip/) to copy text from the "clipboard" and perform certain formatting functions on ...
0
votes
1
answer
273
views
Clips Beginner: How to assign two variables to one template slot value without using multislot in pyclips
I want to insert two variable values in a string slot of a template but I am having errors. I know about the multislot but it is giving me a dictionary output like this:
('1.', '§ 2 is amended as ...
0
votes
1
answer
666
views
"No module named _clips"after installed pyclips
I followed README to install pyclips in linux python2.7(ubuntu18),but it doesn’t work when "import clips",like that:
Traceback (most recent call last):
File "<stdin>", line 1, in <...
1
vote
1
answer
883
views
module 'clips' has no attribute 'SetExternalTraceback'
We tried running this code in python 2.7 with clips - v6.3, kivy- v1.11.1. The error we are getting is on line main(sys.argv) saying "Module clips has no attribute SetExternalTraceback". And ...
0
votes
2
answers
470
views
How to use PyCLIPS for interactive sessions?
My clip file contains (printout t"text") and bind ?var (read) statements. If I run the .clp file from below C code, the program prints to console and reads my input from console as expected, thus ...
0
votes
2
answers
265
views
Pyclips: Error when setting a clips class instance multislot to [ ]
I want a multislot of a class instance to become an empty list. I am not sure if there is a bug in clips or pyclips, or if I am doing it wrong.
import clips
C = clips.BuildClass("C", "(is-a USER)(...
0
votes
1
answer
116
views
Avoid pattern matching (errors) until a slot is set correctly
The LHS of a rule R_blup contains
(test (>= ?s2 2))
that is, it checks if ?s2 is greater or equal to 2. ?s2 corresponds to an instance slot named s2.
Unfortunately, I get the error
Function >=...
0
votes
1
answer
240
views
PyClips clips.BatchStar() and Clips (batch ...) do not work together
I have three files:
1.) A python filetest.py:
import clips
PATH_TO_CLP_FILE = r'd:\temp\batch_bug.clp'
clips.BatchStar(PATH_TO_CLP_FILE)
clips.PrintFacts()
2.) A file batch_bug.clp:
(assert (asdf0))...
0
votes
1
answer
217
views
CLIPS (clear) command fails / throws exception in pyclips
I have a pyclips / clips program for which I wrote some unit tests using pytest.
Each test case involes an initial clips.Clear() followed by the execution of real clips COOL code via clips.Load(...
1
vote
0
answers
167
views
Python - complex questionaire with CLIPS
I have a rather large questionaire on my page right now with around 50 questions whose purpose is to see if the user could be a relevant client of mine. I want to reduce it to 5 or max 10 questions by ...
1
vote
0
answers
1k
views
Installing PyCLIPS based on CLIPS 6.30 for Windows Python 2.7 32 bit
I learned that there is a version of PyCLIPS based on CLIPS version 6.30.
The same (or similar) PyCLIPS version can also be installed via pip, see here.
On Linux, both approaches work fine, i.e. ...
0
votes
0
answers
85
views
Passing big numbers (bigger than python's int) from CLIPS to python via PyCLIPS
It seems that PyCLIPS converts very large numbers to int before translating them.
See here for conversion Python -> CLIPS
def _py2cl(o):
"""convert Python data to a well-formed tuple"""
t1 = ...
1
vote
0
answers
141
views
PyCLIPS: How to recover from errors
I'm using PyCLIPS to integrate CLIPS in a program that should act as a ECA-Server (event-conditon-action).
There are incoming events that, together with the system state, may or may not trigger rules ...
0
votes
1
answer
527
views
Python function in LHS of CLIPS rule called multiple times - how to wait for a variable to contain a value?
I read here how to call a python function on the lhs of a clips rule.
Now I have the following rule:
(defrule python_func_lhs "comment me"
(object (is-a clips_TEST_CLASS) (some_slot ?...
0
votes
1
answer
250
views
Displaying the value of a variable in PyClips
I have been trying to print the value of a variable in PyClips without any success.Any help would be appreciated. Here is the code.
Instead of "Are you observative" it prints "Are you ?name"
def ...