Under Julia 0.4 redirect_stdout() no longer accepts a pipe

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Under Julia 0.4 redirect_stdout() no longer accepts a pipe

Peter Simon
The following works under Julia 0.3 but fails under Julia 0.4:

stdout_orig = STDOUT
(tstream, teeproc) = open(`tee -a temp.txt`, "w", stdout_orig)
redirect_stdout(tstream)


The error message under Julia 0.4.0 is generated by the final line above and reads: "ERROR: MethodError: `redirect_stdout` has no method matching redirect_stdout(::Pipe)".  But according to the documentation for redirect_stdout, the argument to the function can be a pipe.  Is this behavior intentional and merely a documentation error or is it a bug?

Thanks,
Peter


Reply | Threaded
Open this post in threaded view
|

Re: Under Julia 0.4 redirect_stdout() no longer accepts a pipe

Isaiah Norton

On Fri, Oct 9, 2015 at 7:32 PM, Peter Simon <[hidden email]> wrote:
The following works under Julia 0.3 but fails under Julia 0.4:

stdout_orig = STDOUT
(tstream, teeproc) = open(`tee -a temp.txt`, "w", stdout_orig)
redirect_stdout(tstream)


The error message under Julia 0.4.0 is generated by the final line above and reads: "ERROR: MethodError: `redirect_stdout` has no method matching redirect_stdout(::Pipe)".  But according to the documentation for redirect_stdout, the argument to the function can be a pipe.  Is this behavior intentional and merely a documentation error or is it a bug?

Thanks,
Peter