IronPython

IronPython

Infobox Software
name = IronPython



caption =
developer = Jim Hugunin
latest release version = 1.1.2
latest release date = August 8, 2008
latest preview version = 2.0 Beta 4
latest preview date = August 6, 2008
operating system =
platform = .NET Framework, Mono
genre = Python Programming Language Interpreter
license = Microsoft Public License
website = [http://www.codeplex.com/IronPython www.codeplex.com/IronPython]

IronPython is an implementation of the Python programming language, targeting the .NET Framework and Mono, created by Jim Hugunin. Version 1.0 was [http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython released] on September 5, 2006. [cite web
url = http://blogs.msdn.com/hugunin/archive/2006/09/05/741605.aspx
title = Jim Hugunin's blog: IronPython 1.0 released today!
date = September 5, 2006
accessdate = 2006-12-14
]

IronPython is written entirely in C#, although some of its code is automatically generated by a code generator written in Python.

Status and roadmap

The current 1.1.2 version targets CPython 2.4.4 for compatibility. However, there are some differences between the Python reference implementation and IronPythoncite web
url=http://www.codeplex.com/IronPython/Wiki/View.aspx?title=Differences&referringTitle=Home
title=Differences between IronPython 1.0 and CPython 2.4.3
publisher=Microsoft
date=2007-12-18
accessdate=2008-02-09
] . Some projects built on top of IronPython are known not to work under CPython. [cite web
url=http://lists.ironpython.com/pipermail/users-ironpython.com/2008-January/006297.html
title=New Project: Implementing .NET Libraries in Pure Python
last=Foord |first=Michael
accessdate=2008-02-09
] Conversely, CPython applications that depend on extensions to the language that are implemented in C (e.g. NumPy) are not compatible with IronPython [cite web
url=http://dirtsimple.org/2005/10/children-of-lesser-python.html
title=Children of a Lesser Python
last=Eby |first=Phillip
accessdate=2008-07-09
] , although a commercially-supported open source project to address this is underway. [cite web
url=http://www.resolversystems.com/documentation/index.php/Ironclad
title=Ironclad
accessdate=2008-07-09
]

Release 2.0, currently in beta state, targets CPython 2.5. IronPython 2.0 is built on top of the upcoming Dynamic Language Runtime which contains a Dynamic Type System and Dynamic Language Hosting Environment abstracted out of IronPython 1.

The Dynamic Language Runtime is meant to make it easier to write dynamic languages for the CLR. Dynamic languages being developed to run on the DLR include:

* IronPython and IronRuby
* the upcoming versions of JScript and VBx, a dynamic version of Visual Basic .NET.

The DLR runs on top of the core CLR that will ship with the upcoming Silverlight 2.0. This means that IronPython can be used for client-side browser scripting with Silverlight.

License

Until version 0.6 IronPython was released under the Common Public License.cite web
url = http://www.ironpython.com/old.html
title = Original IronPython homepage
date = July 28, 2004
accessdate = 2007-05-13
] Following recruitment of the project lead in August 2004, IronPython was made available as part of Microsoft's Shared Source initiative. Authors claim that the license,cite web
url = http://www.codeplex.com/IronPython/Project/License.aspx?LicenseHistoryId=129
title = Shared Source License for IronPython
date = April 28, 2006
accessdate = 2007-05-13
] while not reviewed by the Open Source Initiative, conforms to the OSI's definition of open source. With the 2.0 alpha release, the license was again changed, to the Microsoft Public License.cite web
url = http://www.codeplex.com/IronPython/Project/License.aspx?LicenseHistoryId=2866
title = Microsoft permissive license
date = April 28, 2007
accessdate = 2007-05-13
]

Interface extensibility

One of IronPython's key advantages is in its function as an extensibility layer to application frameworks written in a .NET language. It is relatively simple to integrate an IronPython interpreter into an existing .NET application framework. Once in place, downstream developers can use scripts written in IronPython that interact with .NET objects in the framework, thereby extending the functionality in the framework's interface, without having to change any of the framework's code base.

IronPython makes extensive use of reflection. When passed in a reference to a .NET object, it will automatically import the types and methods available to that object. This results in a highly intuitive experience when working with .NET objects from within an IronPython script.

Example

The following IronPython script manipulates .NET framework objects. This script can be supplied by a third-party client-side application developer and passed into the server-side framework through an interface. Note that neither the interface, nor the server-side code is modified to support the analytics required by the client application. from BookService import BookDictionary booksWrittenByBookerPrizeWinners = [book.Title for book in BookDictionary.GetAllBooks if "Booker Prize" in book.Author.MajorAwards] booksWrittenByBookerPrizeWinners In this case, assume that the .NET Framework implements a class, BookDictionary, in a module called BookService, and publishes an interface into which IronPython scripts can be sent and executed.

This script, when sent to that interface, will iterate over the entire list of books maintained by the framework, and pick out those written by Booker Prize-winning authors.

What's interesting is that the responsibility for writing the actual analytics reside with the client-side developer. The demands on the server-side developer are minimal, essentially just providing access to the data maintained by the server. This design pattern greatly simplifies the deployment and maintenance of complex application frameworks.

See also

* Boo, a language for the .NET Framework and Mono with Python-inspired syntax and features borrowed from C# and Ruby.
*IronLisp
*IronRuby
* Jython - an implementation of Python for the JVM.
* Resolver One - a commercial application (with free license) written in IronPython, with the largest known IronPython codebase [ [http://www.sdtimes.com/SearchResult/31818 Extreme Program - Software Development Times On The Web ] ]

References

External links

* [http://www.codeplex.com/IronPython CodePlex IronPython Workspace] - IronPython Homepage
* [http://www.codeplex.com/IronPythonStudio IronPython Studio] - IronPython IDE, with WPF and Windows Forms designer, that will run standalone or integrated into Visual Studio
* [http://www.ironpython.info IronPython Cookbook Wiki]
* [http://ironpython-urls.blogspot.com/ IronPython URLs Blog]
* [http://www.ironpythonresource.com/ IronPython ASP.NET Blog and Tutorials] - IronPython tutorials, screencasts, and script generators
* [http://www.ironpythoninaction.com/ IronPython in Action] - IronPython book, published by Manning
* [http://www.voidspace.org.uk/ironpython/index.shtml Tutorial Series on IronPython and Windows Forms]
* [http://www.microsoft.com/resources/sharedsource/default.mspx Microsoft Shared Source Initiative]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • IronPython — Erscheinungsjahr: 2006 Entwickler: Jim Hugunin, Microsoft Aktuelle Version: 2.7.0[1]  (12. März 2011) Betriebssystem …   Deutsch Wikipedia

  • IronPython — Тип Python Programming Language Interpreter Разработчик Jim Hugunin Аппаратная платформа .NET Framework, Mono Последняя версия 2.7.3 (Июль 7, 2012) Лицензия Apache License version 2.0 …   Википедия

  • IronPython — IronPython(It Run On Net) est une implémentation du langage Python, visant .NET et Mono, créée par Jim Hugunin. La version 1.0 est sortie le 5 septembre 2006. IronPython est écrit entièrement en C#. Il est disponible comme partie de l initiative… …   Wikipédia en Français

  • IronPython — Desarrollador(es) Jim Hugunin www.codeplex.com/IronPython Información general Paradigma multiparadigma: orientado a objeto …   Wikipedia Español

  • Dynamic Language Runtime — Developer(s) Microsoft Dynamic Language Runtime Team Stable release 1.0 / April 16, 2010 Operating system Microsoft Windows, Debian, Ubuntu Platform …   Wikipedia

  • Python — У этого термина существуют и другие значения, см. Python (значения). Python Класс языка: му …   Википедия

  • Пайтон — Python Класс языка: функциональный, объектно ориентированный, императивный, аспектно ориентированный Тип исполнения: интерпретация байт кода, компиляция в MSIL, компиляция в байт код Java Появился в: 1990 г …   Википедия

  • Visual Basic .NET — Paradigm(s) Structured, imperative, object oriented and declarative Appeared in 2001 Designed by Micro …   Wikipedia

  • SharpDevelop — Bildschirmfoto der Version 2.0 Basisdaten Entwickler IC#Code Aktuelle Version …   Deutsch Wikipedia

  • Dynamic Language Runtime — La DLR est une surcouche facilitant l implémentation et l interopérabilité des langages dynamiques. La DLR permet de supporter plusieurs langages. Cette technologie est utilisé par Microsoft pour la plateforme .NET et Sun pour son langage java.… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”