简体   繁体   English

在C#中使用IronPython

[英]Using IronPython in C#

I've recently discovered IronPython in C# and only tutorials I found were how to use python script in C#, but I've noticed, that IronPython has classes and methods you can use directly in C# like : PythonIterTools.product some_pr = new PythonIterTools.product(); 我最近在C#中发现了IronPython,只有我发现的教程是如何在C#中使用python脚本,但是我注意到,IronPython具有可直接在C#中使用的类和方法,例如: PythonIterTools.product some_pr = new PythonIterTools.product(); and others, can anyone explain how does this work? 和其他人,谁能解释这是如何工作的?

IronPython标准库的某些部分是用C#实现的,主要是因为CPython中的等效部分是用C编写的。您可以直接从C#(或任何其他静态.NET语言)直接访问这些部分,但并不打算使用它们。这样,可能并不容易使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM