如何将 IronPython 与 Visual Studio 2008 结合使用
我尝试过使用 Microsoft 提供的 IronPython 集成扩展。 但它不适用于 Visual Studio 2008。IronPython
是否有合适的 VS 2008 IDE 扩展?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
对于 IronPython 1.1 支持(其语法镜像 CPython 2.4),我成功构建并安装了来自 Visual Studio 2008 SDK 1.0 以及 Visual Studio 2008 SP1 专业版。 它适用于从 Standard 到 Team Suite 的任何版本。 由于 Express 内置的限制,它肯定无法与 Express Edition 一起使用。
对于 IronPython 2.0(其语法镜像 CPython 2.5),目前没有在 Visual Studio 2008 下编写和调试的好方法,不幸的是,适应 IronPython Studio 来托管 IronPython 2.0——IronPython 2.0 的重大更新之一是使其基于 动态语言运行时,这打破了以前使用的静态编译等启用 IntelliSense 的技巧。
For IronPython 1.1 support (whose syntax mirrors CPython 2.4), I successfully built and installed the sample from the Visual Studio 2008 SDK 1.0 with the Professional Edition of Visual Studio 2008 SP1. It will work with any edition from Standard up to Team Suite. It definitely won't work with Express Edition due to limitations built in to Express.
For IronPython 2.0 (whose syntax mirrors CPython 2.5), there is currently no good way to write and debug under Visual Studio 2008, and unfortunately, it would be a significant undertaking to adapt IronPython Studio to host IronPython 2.0--one of the big updates in IronPython 2.0 was to base it on the Dynamic Language Runtime, and this breaks the tricks for enabling IntelliSense that were used previously such as static compilation.
您是否尝试过 适用于 VS 2008 Shell 的 IronPython Studio
Have you tried the IronPython Studio for VS 2008 Shell
目前,没有可在 Visual Studio 上运行 IronPython v2.0 的扩展。
Right now, there is no extension to run IronPython v2.0 on Visual Studio.
我对 VS2008 和 IronPython 都很陌生(但不是 Python 本身):但在我看来,我确实像是在 VS 2008 Pro 下运行 IronPython 2.0.1,尽管方式相当麻烦。
其余的说明对我有用:我构建了一个简单的测试控制台应用程序,它按我的预期工作。 不过,我还没有尝试过任何 .Net 的东西。
现在,如果有一种简单的方法来更改 sys.path 以使用普通的 Python 库......
I'm new to both VS2008 and IronPython (but not Python itself): but it sure looks to me like i'm running IronPython 2.0.1 under VS 2008 Pro, albeit in a rather cumbersome fashion.
The rest of the instructions worked for me: i built a simple test console app, and it worked as i expected. I haven't tried any .Net stuff yet, though.
Now if there were just an easy way to change sys.path to use the normal Python libraries ...
有关完整的教程和示例代码,请查看以下链接:
使用 IronPython 扩展 C# 应用程序
http://blogs.microsoft.co.il/blogs/berniea/archive/2008/12/04 /extending-your-c-application-with-ironpython.aspx
For the complete tutorial and example code, check out the following link:
Extending your C# application with IronPython
http://blogs.microsoft.co.il/blogs/berniea/archive/2008/12/04/extending-your-c-application-with-ironpython.aspx
如果您只是想在 ASP .NET 网站中使用 IronPython(不支持的项目),请查看 如何安装 Microsoft ASP.NET Futures(2007 年 7 月)
If you are just looking at using IronPython in ASP .NET websites (projects not supported), check out how to install Microsoft ASP.NET Futures (July 2007)