# IJulia & PyCall: output buffering

**URL:** <https://discourse.julialang.org/t/ijulia-pycall-output-buffering/26438>\
**Category:** General Usage\
**Created:** [July 16, 2019, 6:14pm UTC](https://discourse.julialang.org/t/ijulia-pycall-output-buffering/26438 "2019-07-16T18:14:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [July 16, 2019, 8:06pm UTC](https://discourse.julialang.org/t/ijulia-pycall-output-buffering/26438/2 "2019-07-16T20:06:10Z")

</div>

> [@aplavin](#):
>
> 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.

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.)

---

_[View the full topic](https://discourse.julialang.org/t/ijulia-pycall-output-buffering/26438)._
