comp.lang.ada
 help / color / mirror / Atom feed
From: Jarle Thorsen <jarle@genbukan.no>
Subject: Re: Running external program, getting output
Date: 25 Jun 2003 22:39:12 +0200
Date: 2003-06-25T22:39:12+02:00	[thread overview]
Message-ID: <m2n0g5hoy7.fsf@maskin.flamestrike.no-ip.org> (raw)
In-Reply-To: 5972474.ITsLBhBNCF@linux1.krischik.com

Martin Krischik <krischik@users.sourceforge.net> writes:
> Jarle Thorsen wrote:
> 
> > As far as I have gathered the best way of (non OS-specific) running an
> > external program from Ada is using the Spawn procedure in g-os_lib,
> > correct ?
> > 
> > But how do I get the output from the command that I run? Lets say that I
> > want to run "ls" for example.....
> 
> AdaCL has a support class do just this. See TestCommand (test 3) on how to
> do it:
> 
> http://adacl.sourceforge.net/html/TestCommand-Main__adb.htm
> 
> You find AdaCL at:
> 
> http://www.ada.krischik.com
> 
> Also, you can use the GNAT.Expect package.

Reading your suggestions and also packages provided by other posters I am
getting really unsure which way to go...

My main focus is making it as portable as possible, yet as simple as
possible.

My program will 90% percent of the time wait for the spawned program to end
before printing its output, but will on some occations read information
from the program's pipe while it is still running....

Any clues on which solution to choose ?

-- 
Jarle Thorsen




  reply	other threads:[~2003-06-25 20:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 11:51 Running external program, getting output Jarle Thorsen
2003-06-22 13:07 ` Ludovic Brenta
2003-06-22 13:43   ` sk
2003-06-22 15:39     ` Jarle Thorsen
2003-06-22 19:21       ` David C. Hoos
2003-06-22 19:25       ` sk
2003-06-22 17:20 ` Martin Krischik
2003-06-25 20:39   ` Jarle Thorsen [this message]
2003-06-26  2:04     ` sk
2003-06-27 17:47     ` Warren W. Gay VE3WWG
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox