This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: running programs.



[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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]