开发者

Would IronPython allow me to use Python in a C# Project without adding new requirements for deployment?

I have looked at the IronPython website and done various Google searches as well as searching answers on SO and am still not sure about this.

I want to use Python within a C# ASP.NET MVC project such that once the project is deployed I don't need to have Python running on the server that is hosting the application.

I think that is what IronPython does but I am not certain because the description does not seem very specific (or I am just an epic noob).

I could define an object in C# that would basically contain Python scripts, right? Perhaps this 开发者_运维技巧all seems to good to be true which is why I am asking, is there a catch here?


You don't need to have a Python interpreter installed. All you need is the DLR and the IronPython assemblies deployed with your site. Then you could host IronPython inside your application and execute Python scripts and even retrieve the results back in C#.

And here's an example of hosting the DLR in a console application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜