I'm no expert in the Cpython internals, and with Cpython I mean the interpreter that is usually found inside applications that offer a python interpreter, the "classic" python interpreter; Now I was wondering if there is a way to input and output commands to/from Cpython to/from an external application via some sort of IPC mechanism.
In other words I would like to listen to the command given to Cpython and also have the chance to input mine, the main use for this would be some sort of GUI written in C/C++ that is a different application and not the one where cpython is running.
I have access to the source code for both applications, I don't need reverse engineering or some "hacks", I would like to have a real and stable solution.
What would be a good design approach to tackle this problem through perhaps an IPC mechanism? Thanks.
edit: I need this for python 3.x