この記事は検証可能な参考文献や出典が全く示されていないか、不十分です。出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)
出典検索?: "IronPython"
IronPython
作者.mw-parser-output .hlist ul,.mw-parser-output .hlist ol{padding-left:0}.mw-parser-output .hlist li,.mw-parser-output .hlist dd,.mw-parser-output .hlist dt{margin-right:0;display:inline-block;white-space:nowrap}.mw-parser-output .hlist dt:after,.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{white-space:normal}.mw-parser-output .hlist li:after,.mw-parser-output .hlist dd:after{content:" ・ ";font-weight:bold}.mw-parser-output .hlist dt:after{content:": "}.mw-parser-output .hlist-pipe dd:after,.mw-parser-output .hlist-pipe li:after{content:" 。";font-weight:normal}.mw-parser-output .hlist-hyphen dd:after,.mw-parser-output .hlist-hyphen li:after{content:" - ";font-weight:normal}.mw-parser-output .hlist-comma dd:after,.mw-parser-output .hlist-comma li:after{content:"、 ";font-weight:normal}.mw-parser-output .hlist-slash dd:after,.mw-parser-output .hlist-slash li:after{content:" / ";font-weight:normal}.mw-parser-output .hlist dd:last-child:after,.mw-parser-output .hlist dt:last-child:after,.mw-parser-output .hlist li:last-child:after{content:none}.mw-parser-output .hlist dd dd:first-child:before,.mw-parser-output .hlist dd dt:first-child:before,.mw-parser-output .hlist dd li:first-child:before,.mw-parser-output .hlist dt dd:first-child:before,.mw-parser-output .hlist dt dt:first-child:before,.mw-parser-output .hlist dt li:first-child:before,.mw-parser-output .hlist li dd:first-child:before,.mw-parser-output .hlist li dt:first-child:before,.mw-parser-output .hlist li li:first-child:before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child:after,.mw-parser-output .hlist dd dt:last-child:after,.mw-parser-output .hlist dd li:last-child:after,.mw-parser-output .hlist dt dd:last-child:after,.mw-parser-output .hlist dt dt:last-child:after,.mw-parser-output .hlist dt li:last-child:after,.mw-parser-output .hlist li dd:last-child:after,.mw-parser-output .hlist li dt:last-child:after,.mw-parser-output .hlist li li:last-child:after{content:") ";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)" ";white-space:nowrap}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)" "}
ジム・ハグニン(英語版)
マイクロソフト
開発元
ディーノ・フィーランド
.NET Foundation
初版2006年9月5日 (17年前) (2006-09-05)[1]
最新版3.4.0 / 2022年12月12日 (14か月前) (2022-12-12)[2]
最新評価版3.4.0-beta1 / 2022年5月1日 (22か月前) (2022-05-01)[3]
リポジトリ
github.com/IronLanguages/ironpython2
プログラミング
言語C#
プラットフォーム
.NET Framework
.NET Core
Mono
種別Python実装
ライセンスApache License 2.0
公式サイトironpython.net
テンプレートを表示
IronPythonとは、.NET Framework/Mono/.NET Core上で動作するPythonの実装である。Jim Huguninによって開発が進められ、2006年9月5日に初版がリリースされた。バージョン1.x系のIronPythonはPython 2.4.3と互換性がある。IronPython 2.7はPython 2.7互換である[4]。
.NET Frameworkの持つ豊富なクラスライブラリをPythonの文法でシームレスに利用できるだけでなく、従来のPython(CPython)のコード資産さえもある程度そのまま利用できることが特徴である。また、.NETの実行環境に対応した各種ツールが、そのまま利用できる点もメリットといえる。
もともとPythonはスクリプト言語であるが、IronPythonコンパイラサービスによって.NETアセンブリにコンパイルすることも可能である。これは、スクリプト言語として利用する場合はバイトコードに動的コンパイルし、アセンブリの場合は、それが事前コンパイルされたものと考えることができる。
IronPython自身はC#で実装されている。 IronPythonの起源は、「CLIの設計は動的言語との相性が悪い」という.NET Frameworkの問題点を検証するために作成された検証用のプロトタイプであった。IronPythonの作者であるJim Huguninは2003年に、この論文を発表した。その後、「何故、.NET Frameworkは動的言語として駄目なプラットフォームなのか?」という短い論文を書くために、Pythonの移植を試みたところ、彼の意に反して良く動くものができてしまった。そこで、彼は開発を継続することとし、Open Source Conference 2004 でIronPython 0.6をCommon Public Licenseでリリースした。2003年の論文が間違いであったことを、彼自身の手で証明したことになる。 その後、Jim Huguninはマイクロソフトに合流してIronPythonの開発を継続、.NET Framework 2.0に対応したバージョンを作成し、現在ではShared Source Licensing Programとしてリリースしている。 IronPython 2.x系列は.NET 4に対応し、DLR(動的言語ランタイム)上に実装されている。なお、IronPython 2.7までは、対話環境であるIronPython Interactiveや、IronPython用の各種プロジェクト テンプレートをVisual Studio 2010に統合する"IronPython Tools for Visual Studioがインストーラに含まれていたが[5]、2.7.1以降は"Python Tools for Visual Studio" (PTVS) への将来的な移行を見越して、"IronPython Tools?は廃止されている[6]。PTVS 2.2はVisual Studio 2013と2015に対応する[7]。Visual Studio 2015のインストーラーには、PTVSをインストールするオプションが正式に含まれている。 2022年12月12日、Python 3.xをサポートする初の正式版のIronPython 3.4.0がリリースされた[8]。IronPython 3.4.0は.NET Framework 4.6.2、.NET Core 3.1および.NET 6をターゲットにしている。 CPythonの機能と.NET Frameworkの機能を併用する例を示す。# -*- coding: utf-8 -*-# CPython 2.x の組み込み命令を使って標準出力する。print '%d, %f, %s' % (10 * 10, 2 + .3, '"Hello, CPython"')# .NET Framework の基本クラスライブラリを使って標準出力する。import SystemSystem.Console.WriteLine('{0}, {1}, {2}', 10 * 10, 2 + .3, '"Hello, IronPython"')
開発の歴史
コード例
Hello, World
脚注^ Hugunin, Jim (2015年2月19日). “IronPython 1.0 released today!
^ “Releases ・ IronPython 3.4.01
^ “Releases ・ IronLanguages/3.4.0-beta1”. GitHub. 2022年12月13日閲覧。
^ ⇒IronPython.net / Documentation
^ “ ⇒RELEASE NOTES IronPython”. CodePlex (2011年3月13日). 2015年7月1日閲覧。
^ “ ⇒RELEASE NOTES IronPython”. CodePlex (2011年10月22日). 2015年7月1日閲覧。
^ 「Visual Studio 2015」に対応した「Python Tools for Visual Studio 2.2」が正式版に - 窓の杜
^ “Release IronPython 3.4.0”. IronPython Team. 2022年12月13日閲覧。
関連項目
CPython - オリジナルのPython。Cで書かれていることからCPythonとも呼ばれる。
Jython - CPythonをJava仮想マシンに移植したもの。
IronRuby
外部リンク
公式ウェブサイト
ironpython2 - GitHub