Iron Python - Getting Started

From DojoWiki

Jump to: navigation, search

Getting Started

The Basics for this tutorial are found at http://msdn2.microsoft.com/en-us/magazine/cc163344.aspx I've added and subtracted to simplify; but the credit goes to Bill Chiles who wrote the original post.

Download the most recent version of IronPython for the Dynamic Language Runtime (DLR)

The stable for IronPython is IronPython 1.1.*; IronPython 2.0 and greater target the DLR

IronPython includes both Visual Studio 2005 and 2008 solutions.

Open IronPython.sln (for some reason, I had to delete a leading line on the Solution file)

  1. Set the startup project to IronPythonConsole
  2. Create a .py file with valid Python innards
def yo(yourname):
   text = "hello, "
   return text + yourname

print yo("bill")
  1. Specify the afore-created file as an argument in the IronPython commmandline
  2. Run the project
Personal tools