title: Mixing python and C++ via std in and std out
body: <p>I have a problem where it is beneficial for me to be able to mix python code and C++ code, and I think that the task is simple enough that it could be done by simply initializing the C++ program from python, and then having the C++ program "wait" for python to give it some input via std in, and then have python "wait" for the C++ program do its computation and return it via std out etc. </p>
  
  <p>I feel like this is either trivial or extremely extremely hard. My main problem is that each time I initialize the C++ code it takes an extremely long time, but that would only need to be done once if I can get this idea implemented. Any thoughts?</p>