PlutoUI.jl icon indicating copy to clipboard operation
PlutoUI.jl copied to clipboard

`with_terminal` does not capture `CSV.write` output

Open yha opened this issue 4 years ago • 2 comments

with_terminal() do
	CSV.write(stdout, DataFrame(x=[1,2,3],y=[2,3,4]))
end

output is shown in the terminal which launched Pluto, and not inside the notebook: image

yha avatar Nov 07 '21 12:11 yha

I encountered the same problem with Pluto v0.17.1. Using a plain println works fine, specifying stdout causes the same effect described above:

Bildschirmfoto 2022-02-25 um 15 53 53

together with

      From worker 2:	foo

in the terminal that launched Pluto.

I didn't check whether the problem still exists in the most recent version of Pluto (v0.18.1), though. Is there any progress on this? Working with Pluto is really fun, btw!

jonas-schulze avatar Feb 25 '22 14:02 jonas-schulze

Is there an update on this problem? I'm not sure whether it is related, but when I have a macro containing a println, the result is not printed either:

macro foo(e)
	println("In Foo")
	e
end
with_terminal() do
       foo(1)
end

likanzhan avatar Mar 05 '22 00:03 likanzhan