Can't you communicate more directly with an embedded Python interpreter (like python4delphi) ?
Or on Windows something COM?
There are several ways to "directly" interact with python. For C and C++ this is documented here:
https://docs.python.org/3.5/c-api/index.htmlThat said, simply comunicating via streams is more often than not much easier. Also it has much less restrictions on your system. When you do this you basically load a custom interpreter and talk to it, so you are restricted to exactly that interpreter.
While when you do this via streams, no matter if the target system uses python 2 or python 3 or python at all, it just works. One can just rewrite the whole program in bash, java or what not and it would still work (as long as this interface stays the same).
And with formats like json or xml you can transmit arbitrarily complex data between the systems without putting restrictions on their implementation. It also should be noted that python and Pascal types are not compatible at all. So you need to do a hell of a lot conversion anyway, so you don't even have less complexity in your code but most likely even more.
It also removes the locality from the project, meaning you can have both processes running on completely different machines and communicate via tcp (even when using stdin and stdout, netcat is your friend here)
I honestly don't see much reason to use such native interfaces, because this is usually much more complicated without giving you any advantages. There might be certain corner cases (e.g. when high performance is required) but in that case I wouldn't use python at all.