Invoke an octave session via pipe

John W. Eaton jwe at octave.org
Mon May 11 12:17:59 CDT 2009


On 11-May-2009, Qianqian Fang wrote:

| thank you all for the help. After reading a working example posted at
| Lazarus's forum (
| http://forum.lazarus.freepascal.org/index.php?topic=6693.new;topicseen#new),
| I realized that I made a stupid mistake when appending '\n' to the end of
| the command; that's why octave did not respond to my commands. After fixing
| that mistake, the output were printed correctly.
| 
| One follow up question, if I send a command and wait for output, is there a
| way to tell if octave has finished printing (or in a non-busy state) in the
| process level ? Now I can set a maximum wait period and record whatever
| printed before time-out, which is probably not reliable.

I think the normal thing would be to wait for the Octave prompt to
appear in the output.  If you want to see an example of interacting
with Octave over a pipe, you could look at how the Emacs octave-inf
mode works.

jwe


More information about the Help-octave mailing list