How to execute external program and process its output?
aarti at interia.pl
Tue Aug 1 13:54:10 PDT 2006
Regan Heath wrote:
> On Mon, 31 Jul 2006 15:53:00 -0700, BCS <BCS at pathlink.com> wrote:
>> Marcin Kuszczak wrote:
>>> I am trying to execute external command from D program, and then
>>> process its
>>> output. spawnvp() doesn't seem to be enough as it does not return
>>> but just status as int.
>>> How to achieve it in D (I don't know method also in C(++), so even
>>> this will
>>> help <g>)?
>>> Marcin Kuszczak
>> IIRC somewhere back a few months ago, someone made a stream object that
>> did just what you want. You could even write to the program's standard
>> input by outputting to the stream.
> Oh, me, me, pick me! Attached are the classes I wrote back then :)
> Let me know if you have any trouble.
Thanks! I will give it a try.
It would be awesome if such a class could find its way into the standard
More information about the Digitalmars-d-learn