Hi John!
If you want to embed python in c++ app and exchange data between c++ and
python, take a look at the boost::python library.
It's also a platform independent solution (my app's target platforms are
windows vs2015 and linux CentOS7).
You can do something like this:
using namespace boos
On 21.07.2017 10:03, Jian wrote:
>
> Then, I have tried this method. It works. I got the text print from
> the file. below are the code I used following your advice.
>
> import sys
> original = sys.stdout
> sys.stdout = open('redirect.txt', 'w')
> ...
> other code!
> ...
> sys.stdout.close()
> sys.
Hi John!
If you want to embed python in c++ app and exchange data between c++ and
python, take a look at the boost::python library.
It's also a platform independent solution (my app's target platforms are
windows vs2015 and linux CentOS7).
You can do something like this:
using namespace boos