Re: getting arguments computed by a swi program from a bash shell

db <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Thanks for your answer and that of Kilian.

In fact, my swi prolog program is already a script that I call
from a python script (and not a shell script as I have previoulsy told).

I (naively) thought that there was a way to a swi-prolog script
to return values to the program which called it (here my python script),
as a function return values (possibly just one)
to the function which called it.

Best
Dominique



Le 28/10/2013 15:00, Boris Vassilev a écrit :
> You can make your program a script (
> http://www.swi-prolog.org/pldoc/man?section=compilation), if you haven't
> yet, and simply write to standard output (stream alias `user_output`,
> http://www.swi-prolog.org/pldoc/man?section=io, works for any write
> predicate that takes a stream as an argument)? Or maybe I am
> misunderstanding the question?
>
> Best,
> Boris
>
>
>
>
> On Mon, Oct 28, 2013 at 3:46 PM, db <
> [email protected]> wrote:
>
>> Hello,
>>
>> (I am using swi-prolog 64 bits 6.5.1 under ubuntu 12.04)
>>
>> I call a swi-prolog program from a bash shell.
>> This program computes values that I would like to
>> get from the shell.
>> How can I do this ?
>> (presently I use a file to write, but I think there is
>>   a simpler way).
>>
>> Thanks a lot for your answers.
>>
>> Dominique.
>> ______________________________**_________________
>> SWI-Prolog mailing list
>> [email protected].**de <[email protected]>
>> https://lists.iai.uni-bonn.de/**mailman/listinfo.cgi/swi-**prolog<https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog>
>>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.