C # .NET interoperabillity with managed Python (CPython) & # 8594; any problems?

I am working on an app design. The kernel must be written in C #, but I also want to use some pre-built CPython modules (not managed).

So I'm interested in interoperability (calling the CPython method from C # and Call C # from CPython). And if there are problems, because C # runs in the .NET runtime (managed) and CPython is not directly managed.

I already researched this problem with Google and came up with these solutions:

  • Use IronPython via DLR + "CPython extension" +, possibly "IronClad" and call CPython modules from IronPython, and vice versa → are these modules executed managed or unmanaged? Are there any problems if I want to use C # classes and methods from CPython?
  • Use "Python for.NET" -> the same question as above.

What do you think would be better? or do you have another solution?

And the last, but perhaps the most important question, did I understand the above points correctly or did I mess up?

Thank you very much in advance!

+3
source share
2 answers

I think you misunderstood Python. This is an interpreted language 1 . You simply provide the text source files and the interpreter will execute them.

Python CPython, IronPython, Jython, PyPy, . Python, . , , , # ++.

, () Python IronPython. , IronPython, IronPython, .NET.

Python - , , . Python .

1 , .pyc ... "" .


? , Python, .NET. - CPython , C, IronPython.

+2

Python COM #. ( ) .

+1

All Articles