Re: [C++-sig] How to get output from python embedded in VC++

2017-07-21 Thread Horváth Imre István
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

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-21 Thread Stefan Seefeld
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.

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-21 Thread Horváth Imre István
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