Replies: 2 comments
-
The idea to use scryer-prolog like this I got from this issue: #225 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Created issue for the panic: #1439 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wonder what is the best way to run scryer-prolog as a subprocess, where the parent process can send instructions and parse results. I currently try this with Python.
If I use a TTY-capable library (pexpect) I get all kinds of TTY control characters.
My script (you can probably skip to read the script, the script output clearly shows my "problem") is
and I call it as
where foo.pl contains
The idea is that the Python script consults the file and sends the query and later will process the output. The output of the above script is
Is there a configuration parameter to get rid of the lines with the control characters? (
\x1b[
...)I also tried to use the subprocess library which does not provide a TTY to scryer-prolog. The script here (again you might skip reading the script) is
The output indicates that scryer-prolog does not check if it has a TTY.
The first part - consulting 'foo.pl' gives a nice and clear output. But the query somehow fails.
So what is the preferred way to call scryer-prolog from another program, with or without a TTY?
Beta Was this translation helpful? Give feedback.
All reactions