So I started going through the code, trying to finish it earlier today but that made me remember why I stopped in the first place. I'm having a lot of trouble converting these two lines of Java into Python:
String evalStr = "(WINES::get-wine-list)";The conversion itself is quite simple but I can't get pyClips to evaluate the function, I keep getting this:
MultifieldValue pv = (MultifieldValue) clips.eval(evalStr);
>>> clips.Eval("(WINES::get-wine-list)")
Traceback (most recent call last):
File "", line 1, in
clips.Eval("(WINES::get-wine-list)")
File "C:\Python25\lib\site-packages\clips\_clips_wrap.py", line 3430, in Eval
return _cl2py(_c.eval(expr))
ClipsError: C10: unable to evaluate expression
Are you using 6.3? Specifying the module name when calling a deffunction isn't allowed in 6.24.
SvaraRaderaHmm, that's a good question. I thought I was, but... apparently not.
SvaraRadera>>> import clips
>>> clips.CLIPS_VERSION
'6.24'
>>>
I wonder where that DLL is hidden... I don't have that version installed. PyClips probably works very differently from how I imagine it ;-)
Well, at least, that explains my problem. Thanks.
Hi...
SvaraRaderano DLL, actually. Python uses its own ".pyd" DLL format, where no function name is exported apart from init_clips(). This, and the fact that Python "prefers" to have its modules compiled with its peculiar options, are the reasons why I decided to recompile CLIPS entirely in the PyCLIPS module.
As I commented on SF, I'll start ASAP to work on CLIPS 6.30, even though I'd prefer its Author to consider it stable, at least on the API side.
Thank you for reporting the issue.
Cheers,
F.
Thanks Franz,
SvaraRaderathat explains the _clips.pyd file in that folder ;-)
I completely understand if you don't want to support 6.3 while it's in beta. I didn't know that this type of function call was an unsupported feature up until 6.3 and that's why I reported it as a bug.
I'll modify the winedemo.clp file to get the GUI working. I think that's the best way for now and it won't create extra work for you either. So don't feel pressured to start 6.3 earlier on my behalf.