Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle stdout & stderr messages more pythonic #192

Open
C0nsultant opened this issue May 22, 2018 · 1 comment
Open

Handle stdout & stderr messages more pythonic #192

C0nsultant opened this issue May 22, 2018 · 1 comment

Comments

@C0nsultant
Copy link
Member

C0nsultant commented May 22, 2018

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 and logging on a very basic level or some advanced implementation that can differentiate and mute multiple levels of output (as present for example in PIConGPU).

@C0nsultant C0nsultant changed the title Handle stdout & stderr messages mroe pythonic Handle stdout & stderr messages more pythonic May 22, 2018
@ax3l
Copy link
Member

ax3l commented May 23, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants