Open cjdoris opened 2 years ago
What PyCall does is to set sys.stdout
to Base.stdout
and it seems to work fine.
I recently also updated PyCall to install a post-execute hook to flush Python stdio after each cell is executed in IJulia.
But maybe you are talking about JuliaCall from IPython here, not PythonCall from IJulia?
Yeah exactly, this ticket is about the other side (using JuliaCall from IPython).
We used to set
Base.stdout
toPyIO(sys.stdout)
but this causes bugs so is removed.Instead copy the IJulia approach: use
pipe = redirect_stdout()
and have an async task watch the pipe for output and write it tosys.stdout
.