Open C0nsultant opened 6 years ago
:+1: Also relevant for the notebook because otherwise we will write to the running kernel's log instead of to the frontend the user is seeing.
Fun fact: throws are easy to pythonize.
Implementation idea: probably define in the series a method to select the default out/err[/log] channel and alle linked objects inherit it. In the Python API, we can set the python-method on init automatically during the binds.
Currently (see #191), all output generated by the C++ API is piped to
std::cout
/std::cerr
.For ideal Python support - which includes pythonic output and logging - one would need to capture the output from C++ and redirect it to message handling facilities in python. This could be Python's
stdout
/stderr
andlogging
on a very basic level or some advanced implementation that can differentiate and mute multiple levels of output (as present for example in PIConGPU).