[xcvb-devel] run-program/process-output-stream

Faré fahree at gmail.com
Thu Apr 14 14:30:53 UTC 2011


On 14 April 2011 01:59, Peter Keller <psilord at cs.wisc.edu> wrote:
> (run-program/process-output-stream '("echo" "string") 'slurp-stream-lines)
>
> I get back this list:
> ("string") ;; notice no newline.
>
> Now suppose I call it like this:
>
> (run-program/process-output-stream '("echo" "string") 'slurp-stream-string)
>
> I would then get back:
>
> "string
> "
>       ^ Notice the newline
>
> Is this the expected behavior for this function wrt these output-processors?
>
Yes. In one case, you get the entire output in a single string that
you may process as you wish, in the other you use read-line, which
strips newlines for you.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
Always design a thing by considering it in its next larger context — a chair
in a room, a room in a house, a house in an environment, an environment in a
city plan. — Eliel Saarinen




More information about the xcvb-devel mailing list