Skip to content

Flush cout to notebook during code execution (pyROOT issue?) #22170

@will-cern

Description

@will-cern

Feature description

Hello. I've seen this being requested a few times by others over the years, and I want to throw in my request for this feature, as we are getting close to having tooling for advanced statistical analysis where it is normal for things to take a bit of time to execute, and in a terminal there is periodic printout to show progress but this is not being displayed in a jupyter notebook. A minimal reproducer could perhaps be simply:

import ROOT
ROOT.gInterpreter.ProcessLine("""
for(int i=0;i<5;i++) {
std::cerr << i << std::endl << std::flush;
sleep(1);
}
""")

if you run this in the terminal, you see the output as it runs. In a notebook, you see it only once execution completes.
It would be really really really nice if we could have the output in the notebook as it runs, even if this is an experimental feature for now?? Pllleeeeeeaaaasee! :)

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions