I have a C++ executable, for an eye tracker, that printf's gaze coordinates to the terminal. I need to be able to get these into Python for data analysis etc. It would be awesome if there was a way that I could do this in real time, so I could manipulate the incoming data in python. The closest thing I've found to being useful is this: http://fluxtrap.blogspot.co.uk/2011/09/dead-simple-real-time-plotting-with-cc.html. However this seems to be for UNIX, and I'm on Windows. So my question is, is there a similar technique such that I can run my c++ program and use it's data in Python??
Asked
Active
Viewed 323 times
1 Answers
0
However this seems to be for UNIX, and I'm on Windows. So my question is, is there a similar technique such that I can run my c++ program and use it's data in Python??
As mentioned here the windows cmd.exe
shell (and powershell also) support the |
symbol the same way, as linux/unix shells do.
A bit of a special thing (for both kind of OS) is you need to invoke the python interpreter explicitly. So running your stuff like
mycppprogram | python mypyscript.py
should work to achieve what you want.

πάντα ῥεῖ
- 1
- 13
- 116
- 190
-
@user3080432 You may consider to accept my answer, if it worked out well for you. – πάντα ῥεῖ Feb 07 '17 at 19:53