Question

If it doesn't use ironpython, how C# use cpython program(py file)?

Because there are some bugs that ironpython load cpython code.

Was it helpful?

Solution

If you need strict CPython behavior and do not want to change Python program I am afraid that in this case you should spawn separate CPython process and interact with it via some RPC protocol (there are plenty to choose from) via pipe or network connection to localhost.

As alternative to "serialized" RPC you might use system's facilities e.g. COM if you're on Windows or D-Bus on Linux - but this would make code platform dependent and not necessarily simpler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top