This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: running programs.
| 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.
That's (ice-9 popen) in the current version of Guile. It can't handle
bidirectional communication, but there's a run-with-pipe and some
other stuff in:
ftp.red-bean.com/pub/guile/contrib/modules/goosh-19971021.tar.gz
Surprisingly it doesn't seem to have bitrotted yet.