Display std::out and std::err Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jvre
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Oct 30, 2020 8:05 am

Display std::out and std::err

Post by jvre »

Hi,

I have a application in C++ that uses librairies that print on std::out and std::err (like embbeding python (PyErr_Print())) and I can't find a solution to catch what it's printed. I search for a while but nothing of what I found work.

Do someone has a solution ?

Regards
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Display std::out and std::err

Post by PB »

What did you try so far? I expect the first was this
https://docs.wxwidgets.org/trunk/classw ... ector.html

Obviously, among else, this assumes that the output happens in the same process.

I am not familiar with embedding Python and such, so the obvious question is: Is there no way to tell the library to use a different output / redirect it? If there is not, it would seem quite a flaw for a Windows library...
jvre
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Oct 30, 2020 8:05 am

Re: Display std::out and std::err

Post by jvre »

Hi,

Sorry for the late response. I tried the solution proposed there : https://stackoverflow.com/questions/481 ... ing-stdout

I was looking for a more global scope solution but I will try that.

Thanks
Post Reply