fbpx
Wikipedia

IronPython

IronPython is an implementation of the Python programming language targeting the .NET Framework and Mono. Jim Hugunin created the project and actively contributed to it up until Version 1.0 which was released on September 5, 2006.[3] IronPython 2.0 was released on December 10, 2008.[4] After version 1.0 it was maintained by a small team at Microsoft until the 2.7 Beta 1 release. Microsoft abandoned IronPython (and its sister project IronRuby) in late 2010, after which Hugunin left to work at Google.[5] 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.[6][7]

IronPython

Original author(s)Jim Hugunin, Microsoft
Developer(s)Dino Viehland,
.NET Foundation
Initial releaseSeptember 5, 2006; 16 years ago (2006-09-05)[1]
Stable release
2.7.12[2]  / 21 January 2022; 11 months ago (21 January 2022)
Preview release
3.4.0-beta1 / April 30, 2022; 8 months ago (2022-04-30)
Repository
  • github.com/IronLanguages/ironpython2
Written inC#
Operating systemWindows, Linux, macOS
Platform.NET Framework, .NET, Mono
TypePython programming language implementation
LicenseApache License 2.0
Websiteironpython.net 

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.[8] The DLR is part of the .NET Framework 4.0 and is also a part of Mono since version 2.4 from 2009.[9] The DLR can also be used as a library on older CLI implementations.

Status and roadmap

  • Release 2.0, released on December 10, 2008, and updated as 2.0.3 on October 23, 2009, targets CPython 2.5.[10] IronPython 2.0.3 is only compatible up to .NET Framework 3.5.
  • Release 2.6, released on December 11, 2009, and updated on April 12, 2010, targets CPython 2.6.[11] IronPython 2.6.1 versions is binary compatible only with .NET Framework 4.0. IronPython 2.6.1 must be compiled from sources to run on .NET Framework 3.5. IronPython 2.6.2, released on October 21, 2010, is binary compatible with both .NET Framework 4.0 and .NET Framework 3.5.
  • Release 2.7 was released on March 12, 2011 and it targets CPython 2.7.[12]
  • Release 2.7.1 was released on October 21, 2011 and it targets CPython 2.7.[13]
  • Release 2.7.2.1 was released on March 13, 2012. It enables support for ZIP file format libraries, SQLite, and compiled executables.[14]
  • Release 2.7.4 was released on September 7, 2013.[15]
  • Release 2.7.5 was released on December 6, 2014 and mostly consists of bug fixes.[16]
  • Release 2.7.6 was released on August 21, 2016 and only consists of bug fixes.[17]
  • Release 2.7.7 was released on December 7, 2016 and only consists of bug fixes.[18]
  • Release 2.7.8 was released on February 16, 2018 and consists of bug fixes, reorganized code, and an updated test infrastructure (including significant testing on Linux under Mono). It is also the first release to support .NET Core.[19]
  • Release 2.7.9 was released on October 9, 2018 and consists of bug fixes, reorganized code. It is intended to be the last release before IronPython 3.[20]
  • Release 2.7.10 was released on April 27, 2020 and adds .NET Core 3.1 support.[21]
  • Release 2.7.11 was released on November 17, 2020 and resolves issues when running on .NET 5.
  • Release 2.7.12 was released on January 21, 2022 and resolves issues with .NET 6 and removes support for .NET core 2.1[22]

Differences with CPython

There are some differences between the Python reference implementation CPython and IronPython.[23] Some projects built on top of IronPython are known not to work under CPython.[24] Conversely, CPython applications that depend on extensions to the language that are implemented in C are not compatible with IronPython ,[25] 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.[26]

Silverlight

IronPython is supported on Silverlight (which is deprecated by Microsoft and already has lost support in most web browsers[27]). It can be used as a scripting engine in the browser just like the JavaScript engine.[28] 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.[citation needed]

// 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

Until version 0.6, IronPython was released under the terms of Common Public License.[29] 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.[30] With the 2.0 alpha release, the license was changed to the Microsoft Public License,[31] which the OSI has approved. The latest versions are released under the terms of the Apache License 2.0.

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.[32]

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

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] 

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.

The following script uses the .NET Framework to create a simple Hello World message.

import clr clr.AddReference("System.Windows.Forms") from System.Windows.Forms import MessageBox MessageBox.Show("Hello World") 

Performance

The performance characteristics of IronPython compared to CPython, the reference implementation of Python, depends on the exact benchmark used. IronPython performs worse than CPython on most benchmarks taken with the PyStone script but better on other benchmarks.[33] IronPython may perform better in Python programs that use threads or multiple cores, as it has a JIT compiler, and also because it doesn't have the Global Interpreter Lock.[34][35]

See also

References

  1. ^ "CodePlex Archive".
  2. ^ "IronPython 2.7.12 Latest".
  3. ^ "Jim Hugunin's blog: IronPython 1.0 released today!". 2006-09-05. Retrieved 2006-12-14.
  4. ^ "Release dates for ironpython". 2008-12-10. Retrieved 2009-01-25.
  5. ^ Clarke, Gavin (2010-10-22). "Microsoft cuts loose Iron languages". The Register. Retrieved 2012-04-05.
  6. ^ "IronPython.net". Retrieved 2013-07-03.
  7. ^ . Python Tools for Visual Studio. Archived from the original on 2018-01-26. Retrieved 2013-07-03.
  8. ^ "Dynamic Language Runtime Overview". Microsoft. Retrieved 2014-04-01.
  9. ^ "2009-07-02 Marek Safar · mono/Mono@340222f". GitHub.
  10. ^ . ironpython.codeplex.com. Archived from the original on 2017-12-26. Retrieved 2010-10-16.
  11. ^ . ironpython.codeplex.com. Archived from the original on 2018-01-13. Retrieved 2010-10-16.
  12. ^ . ironpython.codeplex.com. Archived from the original on 2018-01-02. Retrieved 2011-03-12.
  13. ^ . ironpython.codeplex.com. Archived from the original on 2017-12-26. Retrieved 2011-12-30.
  14. ^ . ironpython.codeplex.com. Archived from the original on 2017-12-26. Retrieved 2012-03-24.
  15. ^ . ironpython.codeplex.com. Archived from the original on 2018-01-16. Retrieved 2014-12-07.
  16. ^ . ironpython.codeplex.com. Archived from the original on 2018-01-26. Retrieved 2014-12-07.
  17. ^ "2.7.6". github.com. Retrieved 2016-08-21.
  18. ^ "2.7.7". github.com. Retrieved 2018-01-05.
  19. ^ "2.7.8". github.com. Retrieved 2018-01-05.
  20. ^ "2.7.9". github.com. Retrieved 2018-10-09.
  21. ^ "IronLanguages/ironpython2". GitHub. Retrieved 2020-06-26.
  22. ^ "Releases · IronLanguages/ironpython2". GitHub. Retrieved 2022-08-08.
  23. ^ "Differences between IronPython 1.0 and CPython 2.4.3". Microsoft. 2007-12-18. Retrieved 2008-02-09.
  24. ^ Foord, Michael. . Archived from the original on 2008-08-30. Retrieved 2008-02-09.
  25. ^ Eby, Phillip (15 October 2005). "Children of a Lesser Python". Retrieved 2008-07-09.
  26. ^ "NumPy and SciPy for .NET". Retrieved 2019-04-05.
  27. ^ "Silverlight 5 System Requirements". www.microsoft.com. Retrieved 2019-11-16.
  28. ^ . IronPython.net. Archived from the original on 2013-03-17.
  29. ^ . 2004-07-28. Archived from the original on February 23, 2010. Retrieved 2007-05-13.
  30. ^ "Shared Source License for IronPython". 2006-04-28. Retrieved 2007-05-13.
  31. ^ "Microsoft permissive license". 2007-04-28. Retrieved 2007-05-13.
  32. ^ . Archived from the original on 2009-01-14. Retrieved 2008-11-18.
  33. ^ "IronPython Performance Report". Retrieved 2009-10-05.[permanent dead link]
  34. ^ "IronPython at python.org". python.org. Retrieved 2011-04-04. IronPython has no GIL and multi-threaded code can use multi core processors.
  35. ^ . Archived from the original on 2015-10-31. Retrieved 2015-07-15.

External links

  • Official website  

ironpython, this, article, relies, excessively, references, primary, sources, please, improve, this, article, adding, secondary, tertiary, sources, find, sources, news, newspapers, books, scholar, jstor, january, 2013, learn, when, remove, this, template, mess. This article relies excessively on references to primary sources Please improve this article by adding secondary or tertiary sources Find sources IronPython news newspapers books scholar JSTOR January 2013 Learn how and when to remove this template message IronPython is an implementation of the Python programming language targeting the NET Framework and Mono Jim Hugunin created the project and actively contributed to it up until Version 1 0 which was released on September 5 2006 3 IronPython 2 0 was released on December 10 2008 4 After version 1 0 it was maintained by a small team at Microsoft until the 2 7 Beta 1 release Microsoft abandoned IronPython and its sister project IronRuby in late 2010 after which Hugunin left to work at Google 5 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 6 7 IronPythonOriginal author s Jim Hugunin MicrosoftDeveloper s Dino Viehland NET FoundationInitial releaseSeptember 5 2006 16 years ago 2006 09 05 1 Stable release2 7 12 2 21 January 2022 11 months ago 21 January 2022 Preview release3 4 0 beta1 April 30 2022 8 months ago 2022 04 30 Repositorygithub wbr com wbr IronLanguages wbr ironpython2Written inC Operating systemWindows Linux macOSPlatform NET Framework NET MonoTypePython programming language implementationLicenseApache License 2 0Websiteironpython wbr net 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 8 The DLR is part of the NET Framework 4 0 and is also a part of Mono since version 2 4 from 2009 9 The DLR can also be used as a library on older CLI implementations Contents 1 Status and roadmap 1 1 Differences with CPython 2 Silverlight 3 License 4 Interface extensibility 5 Examples 6 Performance 7 See also 8 References 9 External linksStatus and roadmap EditRelease 2 0 released on December 10 2008 and updated as 2 0 3 on October 23 2009 targets CPython 2 5 10 IronPython 2 0 3 is only compatible up to NET Framework 3 5 Release 2 6 released on December 11 2009 and updated on April 12 2010 targets CPython 2 6 11 IronPython 2 6 1 versions is binary compatible only with NET Framework 4 0 IronPython 2 6 1 must be compiled from sources to run on NET Framework 3 5 IronPython 2 6 2 released on October 21 2010 is binary compatible with both NET Framework 4 0 and NET Framework 3 5 Release 2 7 was released on March 12 2011 and it targets CPython 2 7 12 Release 2 7 1 was released on October 21 2011 and it targets CPython 2 7 13 Release 2 7 2 1 was released on March 13 2012 It enables support for ZIP file format libraries SQLite and compiled executables 14 Release 2 7 4 was released on September 7 2013 15 Release 2 7 5 was released on December 6 2014 and mostly consists of bug fixes 16 Release 2 7 6 was released on August 21 2016 and only consists of bug fixes 17 Release 2 7 7 was released on December 7 2016 and only consists of bug fixes 18 Release 2 7 8 was released on February 16 2018 and consists of bug fixes reorganized code and an updated test infrastructure including significant testing on Linux under Mono It is also the first release to support NET Core 19 Release 2 7 9 was released on October 9 2018 and consists of bug fixes reorganized code It is intended to be the last release before IronPython 3 20 Release 2 7 10 was released on April 27 2020 and adds NET Core 3 1 support 21 Release 2 7 11 was released on November 17 2020 and resolves issues when running on NET 5 Release 2 7 12 was released on January 21 2022 and resolves issues with NET 6 and removes support for NET core 2 1 22 Differences with CPython Edit This section needs expansion You can help by adding to it July 2012 There are some differences between the Python reference implementation CPython and IronPython 23 Some projects built on top of IronPython are known not to work under CPython 24 Conversely CPython applications that depend on extensions to the language that are implemented in C are not compatible with IronPython 25 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 26 Silverlight EditIronPython is supported on Silverlight which is deprecated by Microsoft and already has lost support in most web browsers 27 It can be used as a scripting engine in the browser just like the JavaScript engine 28 IronPython scripts are passed like simple client side JavaScript scripts in lt script gt tags It is then also possible to modify embedded XAML markup The technology behind this is called Gestalt citation needed DLR initialization script lt script src http gestalt ironpython net dlr latest js type text javascript gt lt script gt Client side script passed to IronPython and Silverlight lt script type text python gt window Alert Hello from Python lt script gt The same works for IronRuby License EditUntil version 0 6 IronPython was released under the terms of Common Public License 29 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 30 With the 2 0 alpha release the license was changed to the Microsoft Public License 31 which the OSI has approved The latest versions are released under the terms of the Apache License 2 0 Interface extensibility EditOne 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 32 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 EditThe 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 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 The following script uses the NET Framework to create a simple Hello World message import clr clr AddReference System Windows Forms from System Windows Forms import MessageBox MessageBox Show Hello World Performance EditThe performance characteristics of IronPython compared to CPython the reference implementation of Python depends on the exact benchmark used IronPython performs worse than CPython on most benchmarks taken with the PyStone script but better on other benchmarks 33 IronPython may perform better in Python programs that use threads or multiple cores as it has a JIT compiler and also because it doesn t have the Global Interpreter Lock 34 35 See also Edit Free and open source software portal Computer programming portalBoo a language for the NET Framework and Mono with Python inspired syntax and features borrowed from C and Ruby Cobra IronScheme Jython an implementation of Python for the Java Virtual Machine Cython PyPy a self hosting interpreter for the Python programming language Tao Framework Unladen Swallow A now defunct branch of CPython that aimed to provide superior performance using an LLVM based just in time compilerReferences Edit CodePlex Archive IronPython 2 7 12 Latest Jim Hugunin s blog IronPython 1 0 released today 2006 09 05 Retrieved 2006 12 14 Release dates for ironpython 2008 12 10 Retrieved 2009 01 25 Clarke Gavin 2010 10 22 Microsoft cuts loose Iron languages The Register Retrieved 2012 04 05 IronPython net Retrieved 2013 07 03 Python Tools for Visual Studio Home Python Tools for Visual Studio Archived from the original on 2018 01 26 Retrieved 2013 07 03 Dynamic Language Runtime Overview Microsoft Retrieved 2014 04 01 2009 07 02 Marek Safar mono Mono 340222f GitHub 2 0 3 ironpython codeplex com Archived from the original on 2017 12 26 Retrieved 2010 10 16 2 6 ironpython codeplex com Archived from the original on 2018 01 13 Retrieved 2010 10 16 2 7 ironpython codeplex com Archived from the original on 2018 01 02 Retrieved 2011 03 12 2 7 1 ironpython codeplex com Archived from the original on 2017 12 26 Retrieved 2011 12 30 2 7 2 1 ironpython codeplex com Archived from the original on 2017 12 26 Retrieved 2012 03 24 2 7 4 ironpython codeplex com Archived from the original on 2018 01 16 Retrieved 2014 12 07 2 7 5 ironpython codeplex com Archived from the original on 2018 01 26 Retrieved 2014 12 07 2 7 6 github com Retrieved 2016 08 21 2 7 7 github com Retrieved 2018 01 05 2 7 8 github com Retrieved 2018 01 05 2 7 9 github com Retrieved 2018 10 09 IronLanguages ironpython2 GitHub Retrieved 2020 06 26 Releases IronLanguages ironpython2 GitHub Retrieved 2022 08 08 Differences between IronPython 1 0 and CPython 2 4 3 Microsoft 2007 12 18 Retrieved 2008 02 09 Foord Michael New Project Implementing NET Libraries in Pure Python Archived from the original on 2008 08 30 Retrieved 2008 02 09 Eby Phillip 15 October 2005 Children of a Lesser Python Retrieved 2008 07 09 NumPy and SciPy for NET Retrieved 2019 04 05 Silverlight 5 System Requirements www microsoft com Retrieved 2019 11 16 Write browser applications in Python IronPython net Archived from the original on 2013 03 17 Original IronPython homepage 2004 07 28 Archived from the original on February 23 2010 Retrieved 2007 05 13 Shared Source License for IronPython 2006 04 28 Retrieved 2007 05 13 Microsoft permissive license 2007 04 28 Retrieved 2007 05 13 Using NET objects from IronPython in Resolver One Archived from the original on 2009 01 14 Retrieved 2008 11 18 IronPython Performance Report Retrieved 2009 10 05 permanent dead link IronPython at python org python org Retrieved 2011 04 04 IronPython has no GIL and multi threaded code can use multi core processors Python s Hardest Problem Revisited Archived from the original on 2015 10 31 Retrieved 2015 07 15 External links EditOfficial website Retrieved from https en wikipedia org w index php title IronPython amp oldid 1134791590, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.