文章分类

站点统计

  • 分类总数: 13 个
  • 文章总数: 145 篇
  • 评论总数: 47 条
  • 附件总数: 59 个
  • 建站日期: 2008-08-18
  • 访问总数: 472873 人次
  • RSS订阅: 文章|评论

IronPython 2.0 beta 5 已经发布

Admin 于 2008-09-30 00:02:48 发表.Net

订阅: http://www.kaiyuan8.org/Feed/Article_98.aspx
引用: 点这里获取地址 (UTF-8)
使用Vernam(维尔南/弗纳姆)算法实现文件加密解密[C#] < IronPython 2.0 beta 5 已经发布 > LyteBox -另一个LightBox效果库

IronPython 2.0 beta 5 已经发布,下载地址:http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=15625。IronPython 2.0 Beta 5是2.0系列的最后一个beta版本,下个版本就是RC版了。也就是说到了下个版本所有API都将固化了。现在也是到学习IronPython 2的时间了。从beta 4发布就有了msi 安装文件,并且带来了python的标准库 ,标准库的许可是以Python Software Foundation license 发布,这也就意味着移值cpython应用会很容易了。

值得注意的是带来了DLR hosting spec 的稳定版本,你可以从这里下载 DLR hosting spec的word 版本 http://compilerlab.members.winisp.net/dlr-spec-hosting.doc

这个版本还有一个最明显的变化的是命名空间作了个重大的修改,把所有的DLR 类型从System移到了Microsoft,原因是http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/thread.html#8036 许多人把IronPython嵌入到C# (.NET 3.5)项目中。

另外一点是DLR 宿主API不有一个针对Python的默认配置,现在应该用IronPython.Hosting.Python去创建脚本引擎,这样在应用程序中宿主 IronPython就更容易了。IronPython.Hosting.Python有几个辅助方法,以创建一个ScriptRuntime或 ScriptEngine ,并为ScriptRuntime和ScriptEngine增加了一些Python-specific 扩展方法。

  1. using IronPython.Hosting; 
  2.  
  3. ScriptEngine engine = Python.CreateEngine(); 
  4.  
  5. ScriptScope sys = engine.GetSysModule(); 
  6. var platform = sys.GetVariable("platform"); 
  7. Console.WriteLine(platform); 
  8.  
  9. ScriptScope builtins = engine.GetBuiltinModule(); 
  10. var pow = builtins.GetVariable<doubledouble,double>>("pow"); 
  11. Console.WriteLine(pow(2,3)); 
  12.  
  13. ScriptScope clr = engine.GetClrModule(); 
  14. var getPythonType = clr.GetVariable
  15. Console.WriteLine(PythonType.Get__name__(getPythonType(typeof(string)))); 

see also:http://blogs.msdn.com/srivatsn/archive/2008/09/16/hosting-ironpython-made-easier.aspx

被阅1002次, 0投一票IronPython
  • 看完了要说点啥么?
  • 昵称 (不填说不了话)
  • 信箱地址 (不会被公开,但是不填也说不了话)
  • 网址 (这个不填也成)
Powered by MiniBoke v2.0.0.8 Build 0828

Copyright © 2008 开源吧!. All rights reserved.

粤ICP备07500939号