How do you redirect a standard stream of a C++ routine wrapped with SWIG and exposed to Python?
- by cmdev
Is it possible to control the standard streams of C++ code in python? The code is wrapped with SWIG and then exposed to Python where I call one of its functions.
I am getting all kinds of unwanted messages coming from C++ code and I want to suppress them either by not using the output stream or by redirecting it to a bit bucket, e.g. devnull from the os module.