IJulia & PyCall: output buffering

IJulia has a task (“green thread”) checking for output every time the main task yields (e.g. with your sleep call). But it has no control over how the operating system does buffering for pipes, short of manually calling flush.

(Separately, if you have a long-running Python function, it presumably won’t yield at all to Julia’s scheduler, in which case IJulia will have no chance to check for output until the Python function completes.)