We have a python 2 module that needs to be upgraded into python 3. And there is C# application in the same host will pass a large XML string data to call that python module and get the response from python by using COM Server. It works perfectly fine as py2exe supports COM Server. But py2exe is no longer available in python 3 and none of the other python releasing tool support COM Server (eg. pyinstaller). So we have to find another way.
I have tried to use Process in C#, use StandardInput to call python and on the python side, I will accept the input to get data and response to C#. It works fine but compared to the previous implementation it looks much slower.
There are some other options like Socket and expose a REST API. But for two applications on the same host, will that be overkill to use the network approach?