Use of IronPython in Monad

STEP1 Install of IronPython 1.0 Beta1

Last month IronPython 1.0 Beta was released.
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742


The install of IronPython is very easy.
1. Download IronPython 1.0 Beta1 from Here
2. Files created by decompression of [IronPython-1.0-Beta1.zip] put your favorite folder.

STEP2 Call IronPython in Monad

1.
Load IronPython.dll.

ex)
[void][Reflection.Assembly]::LoadFrom("C:\IronPython\IronPython.dll")

2.
Create ScriptEngine Object of IronPython by new-object Cmdlet.

ex)
$pe = new-object ironpython.hosting.pythonengine

3.
Call Execute method.

ex)
$code="print 'Hello IronPython'"
$pe.Execute($code)

IronPython Sample

GUI Sample
[void] [Reflection.Assembly]::LoadFrom("C:\IronPython\IronPython.dll")
$pe = new-object ironpython.hosting.pythonengine

$code=@"
import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import *
f = Form(Text="IronPython Sample")
f.ShowDialog()
"@

$pe.Execute($code)
Sample Result