Can I use PyCLIPS as a CLIPS shell?

The module has not been created for this task. However, there are all the commands and utility functions (namely SendCommand and I/O "streams") to allow creating a simple shell. Probably I will post the script I use as a CLIPS shell from within the Python interactive interpreter. Anyway it should be quite easy to create a small script that, in an "endless" loop, does something like:

while True:
    s = read_user_input()
    o = clips.StdoutStream.Read()
    e = clips.ErrorStream.Read()

possibly enhancing it to read more information from other streams and to perform some more tests on user input.

An example of shell...

I just added an example showing a CLIPS shell written in Python, that has the advantage of being usable from within IDLE. Please check the sample code here.


Almost Earthling -