Re: capture stdout or stderr

2017-02-02 Thread Emil via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 14:38:18 UTC, angel wrote: On Wednesday, 1 February 2017 at 01:08:19 UTC, Emil wrote: is it possible to intercept the STDOUT or STDERR and capture the output into a variable ? . writeln(output_buffer); # prints '["test 1","test 2"

Re: capture stdout or stderr

2017-02-02 Thread sarn via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 01:08:19 UTC, Emil wrote: is it possible to intercept the STDOUT or STDERR and capture the output into a variable ? some pseudocode to explain what I mean string[] output_buffer; stdout.capture_to(output_buffer); writeln("test 1"); # not print

Re: capture stdout or stderr

2017-02-01 Thread angel via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 01:08:19 UTC, Emil wrote: is it possible to intercept the STDOUT or STDERR and capture the output into a variable ? some pseudocode to explain what I mean string[] output_buffer; stdout.capture_to(output_buffer); writeln("test 1"); # not print

capture stdout or stderr

2017-01-31 Thread Emil via Digitalmars-d-learn
is it possible to intercept the STDOUT or STDERR and capture the output into a variable ? some pseudocode to explain what I mean string[] output_buffer; stdout.capture_to(output_buffer); writeln("test 1"); # not printed writeln("test 2"); # not printed stdout.r