In Linux, you can use inter process communication, your python is a process in linux, you can have process running your C/C++ code. The communication can one direction or bidirectional.
For python, the python docs are pretty good, once you get the basics from the docs. You can seek out specific tutorial using those API in google.
There are multiple ways to do inter process communication. One of them is socket. I link one of those doc here. 17.2. socket — Low-level networking interface — Python 2.7.10 documentation