openPMD / openPMD/openPMD-api

Handle stdout & stderr messages more pythonic

Open
#192 1 comment 1 reaction 0 assignees View on GitHub
discussion frontend: Python3 good first issue help wanted
Dominant language
C++
Stars
161
Forks
59
Avg merge
2d 22h
Merged PRs (30d)
7

Description

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](https://pybind11.readthedocs.io/en/stable/advanced/pycpp/utilities.html#capturing-standard-output-from-ostream) the output from C++ and redirect it to message handling facilities in python. This could be Python's ```stdout```/```stderr``` and [```logging```](https://docs.python.org/3/library/logging.html) on a very basic level or some advanced implementation that can differentiate and mute multiple levels of output (as present for example in [PIConGPU](https://github.com/ComputationalRadiationPhysics/picongpu/blob/c3054c36ef5cc482233b4779fc9d8dbaed8d1967/src/picongpu/include/debug/PIConGPUVerbose.hpp#L32)).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.