FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/IronPython

IronPython

Contents
Silverlight
License
Interface extensibility
Examples
References

[[File:Ironpython-logo.png|200px]]"},"logo alt":{"wt":""},"logo caption":{"wt":""},"author":{"wt":"[[Jim Hugunin]], [[Microsoft]]"},"developer":{"wt":"Dino Viehland,<br />[[.NET Foundation]]"},"released":{"wt":"{{Release date and age|2006|09|05}}<ref>{{Cite web|url=http://ironpython.codeplex.com/releases/view/423|title=CodePlex Archive|access-date=2014-05-30|archive-date=2017-12-26|archive-url=https://web.archive.org/web/20171226082609/http://ironpython.codeplex.com/releases/view/423|url-status=dead}}</ref>"},"discontinued":{"wt":"<!-- Set to yes if software is discontinued, otherwise omit. -->"},"latest release version":{"wt":"3.4.2"},"latest release date":{"wt":"{{start date and age|2024|12|20}}"},"latest preview version":{"wt":"3.4.0-beta1"},"latest preview date":{"wt":"{{start date and age|2022|04|30}}"},"programming language":{"wt":"[[C Sharp (programming language)|C#]]"},"operating system":{"wt":"[[Microsoft Windows|Windows]], [[Linux]], [[macOS]]"},"platform":{"wt":"[[.NET Framework]], [[.NET]], [[Mono (software)|Mono]]"},"genre":{"wt":"[[Python (programming language)|Python programming language]] implementation"},"license":{"wt":"[[Apache License 2.0]]"}},"i":0}}]}'>
IronPython

Original authorsJim Hugunin, Microsoft
DevelopersDino Viehland,
.NET Foundation
ReleaseSeptember 5, 2006;20 years ago (2006-09-05)

IronPython is an implementation of the Python programming language targeting the .NET and Mono frameworks. The project is currently maintained by a group of volunteers at GitHub. It is free and open-source software, and can be implemented with Python Tools for Visual Studio, which is a free and open-source extension for Microsoft's Visual Studio IDE.

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

IronPython is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynamic typing and dynamic method dispatch, among other things, for dynamic languages. The DLR is part of the .NET Framework 4.0 and is also a part of Mono since version 2.4 from 2009. The DLR can also be used as a library on older CLI implementations.

[</span>icon<span typeof=\"mw:Entity\" id=\"mwlg\">]</span>","txt":"[icon]"}]]}'>

There are some differences between the Python reference implementation CPython and IronPython. Some projects built on top of IronPython are known not to work under CPython. Conversely, CPython applications that depend on extensions to the language that are implemented in C are not compatible with IronPython , unless they are implemented in a .NET interop. For example, NumPy was wrapped by Microsoft in 2011, allowing code and libraries dependent on it to be run directly from .NET Framework.

Silverlight

edit

IronPython is supported on Silverlight (which is deprecated by Microsoft and already has lost support in most web browsers). It can be used as a scripting engine in the browser just like the JavaScript engine. IronPython scripts are passed like simple client-side JavaScript scripts in <script>-tags. It is then also possible to modify embedded XAML markup.

The technology behind this is called Gestalt.

\n<script src=\"http://gestalt.ironpython.net/dlr-latest.js\" type=\"text/javascript\"></script>\n\n<!-- Client-side script passed to IronPython and Silverlight. -->\n<script type=\"text/python\">\n window.Alert(\"Hello from Python\")\n</script>\n"}}'><!-- DLR initialization script. --> <script src="http://gestalt.ironpython.net/dlr-latest.js" type="text/javascript"></script> <!-- Client-side script passed to IronPython and Silverlight. --> <script type="text/python"> window.Alert("Hello from Python") </script>

The same works for IronRuby.

License

edit

Until version 0.6, IronPython was released under the terms of Common Public License. Following recruitment of the project lead in August 2004, IronPython was made available as part of Microsoft's Shared Source initiative. This license is not OSI-approved but the authors claim it meets the open-source definition. With the 2.0 alpha release, the license was changed to the Microsoft Public License, which the OSI has approved. The latest versions are released under the terms of the Apache License 2.0.

Interface extensibility

edit

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.

Examples

edit

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.

References

edit
"Python Tools for Visual Studio- Home". Python Tools for Visual Studio. Archived from the original on 2018-01-26. Retrieved 2013-07-03.
  • ↑ "Jim Hugunin's blog: IronPython 1.0 released today!". 2006-09-05. Retrieved 2006-12-14.
  • ↑ "2.0.3". ironpython.codeplex.com. Archived from the original on 2017-12-26. Retrieved 2010-10-16.
  • ↑ "2.7.1". ironpython.codeplex.com. Archived from the original on 2017-12-26. Retrieved 2011-12-30.
  • ↑ "2.7.5". ironpython.codeplex.com. Archived from the original on 2018-01-26. Retrieved 2014-12-07.
  • ↑ "2.7.8". github.com. Retrieved 2018-01-05.
  • ↑ "Releases · IronLanguages/ironpython2". GitHub. Retrieved 2022-08-08.
  • ↑ IronLanguages. "Release IronPython 3.4.2 · IronLanguages/ironpython3". GitHub. Retrieved 2026-04-26.
  • ↑ Eby, Phillip (15 October 2005). "Children of a Lesser Python". Retrieved 2008-07-09.
  • ↑ "Write browser applications in Python". IronPython.net. Archived from the original on 2013-03-17.
  • ↑ "Shared Source License for IronPython". 2006-04-28. Retrieved 2007-05-13.
  • ↑ "IronPython Performance Report". Retrieved 2009-10-05.{{cite web}}: CS1 maint: deprecated archival service (link)
  • ↑
  • Python
    Implementations
    IDEs
    Topics
    Designer
    Common Language Infrastructure
    Architecture
    Components
    Implementations
    Microsoft
    Other
    Languages
    Major
    Other
    Comparison
    Microsoft free and open-source software (FOSS)
    Overview
    Software
    Applications
    Video games
    Programming
    languages
    Frameworks,
    development tools
    Operating systems
    Other
    Licenses
    Forges
    Related

    View original on Wikipedia | Back | FazBrowse Home