This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: running programs.
- To: guile at sourceware dot cygnus dot com
- Subject: Re: running programs.
- From: Lars Arvestad <arve at nada dot kth dot se>
- Date: 11 Nov 1999 09:47:05 +0100
- References: <m11lgzN-000UuAC@boxer.physics.sunysb.edu>
[I failed to to send this to the list at first try, so here's my
second try.]
Clark McGrew wrote:
CM> I like using guile to write scripts whenever possible, since I find it
CM> a lot easier to use than some of the other options. Unfortunately,
CM> I've run into the same snag several times; I don't know of any easy
CM> way to feed data to an external program and then collect it's output.
CM> Is there a simple way to do what I'd like?
There is '(open-pipe PROGNAME MODE)' where PROGNAME is the executable
and MODE is either OPEN_READ or OPEN_WRITE. I don't think you can do
both using this procedure, but would like to know if I am wrong
regarding that.
open-pipe requires a (use-modeuls (slib popen)) to become available.
I have used this to pipe data to a plotting utility (graph from
libplot) and it works well for my purposes.
Lars
--
Lars Arvestad Dept. of Numerical Analysis and Computing Science
Royal Institute of Technology (KTH), Stockholm, Sweden