Capturing and displaying results from within Julia
1 answer
The answer is here:
https://github.com/JuliaLang/IJulia.jl/issues/455 If you want to display the output then:
show(STDOUT, "text/plain", x)
If you want to pipe the output to a file, then:
x=rand(Float32, 32,32)
f = open("log.txt", "w")
write(f, string(x))
close(f)
And for a larger or more beautiful exit
x = rand(Float32, 1028,1028);
f = open("log.txt", "w");
writedlm(f, x);
close(f);
+3
source to share