brilliant! thanks!

On 2 September 2014 19:09, David Gonzales <[email protected]> wrote:

> i tried saving the old STDOUT before redirecting and then using the saved
> stream to redirect output back to normal. in code:
>
> oldout = STDOUT
> (rd,wr) = redirect_stdout()
> println("hello world")
> readline(rd)
> redirect_stdout(oldout)
> println("hello world")
>
> (with the last line outputting to screen normally)
>
> On Tuesday, September 2, 2014 7:25:05 PM UTC+3, Florian Oswald wrote:
>>
>> hi!
>>
>> this works fine:
>>
>> julia> rdstdout, wrstdout = redirect_stdout()
>> (Pipe(open, 0 bytes waiting),Pipe(open, 0 bytes waiting))
>>
>>
>> *run(`date`)**julia> *
>> *s = readavailable(rdstdout) **"Tue  2 Sep 2014 17:11:33 BST\n"*
>>
>>
>> *but now I want to turn the redirection off again. how do I do this?*
>>
>> thanks!
>>
>

Reply via email to