I noticed that all output from PyCall is buffered in IJulia till the cell finishes evaluating, which is often extremely inconvenient: one cannot easily track progress of a python computation, if it uses
stdout for that. A very simple example:
using PyCall for i in 1:10 pyimport("__builtin__").print(i) sleep(0.5) end
If you run this in plain Julia REPL, then it prints numbers each 0.5 seconds as expected. But running the same code as a cell in Jupyter Lab gives all output at once when it completes. In contrast, native Julia printing works fine in both REPL and Jupyter environments:
for i in 1:10 println(i) sleep(0.5) end
Do you think this should be considered a bug in PyCall or IJulia? And are there any ways to disable this aggressive buffering?