If it doesn't use ironpython, how C# use cpython program(py file)?
Because there are some bugs that ironpython load cpython code.
If it doesn't use ironpython, how C# use cpython program(py file)?
Because there are some bugs that ironpython load cpython code.
It's not clear why you need to use C# at all, but have you considered just invoking python by running it as a separate process via System.Diagnostics.Process.Start()
?
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.