Microsoft released IronPython version 1.0 and not a day goes by that I wish I had more free time to play with other programming languages. I am convinced that if I spend more time learning new languages as opposed to working with 'core languages' like VB and C#, I would be a better software developer.
You can grab IronPython on CodePlex. IronPython is described as such:
“IronPython is a new implementation of the Python programming language running on .NET. It supports an interactive console with fully dynamic compilation. It is well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers, while maintaining full compatibility with the Python language.”
The first thing I wanted to do with IronPython is to execute a select query and return record from SQL Server. After learning a few of its conventions and getting used to the interactive console, I came up with the following code:
C:\IronPython>ipy
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference("System.Data")
>>> from System.Data import *
>>> from System.Data.SqlClient import *
>>> cn = SqlConnection('Data Source=.;Initial Catalog=
AdventureWorks;Integrated Security=True')
>>> da = SqlDataAdapter('SELECT * FROM Person.AddressType',cn)
>>> dt = DataTable()
>>> da.Fill(dt)
6
Hey! We downloaded 6 records from the AdventureWorks Person.AddressType Table :)
You can also start to create some simple Windows Forms:
C:\IronPython>ipy
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference("System.Windows.Forms")
>>> from System.Windows.Forms import *
>>> form = Form(Text='Hello World')
>>> form.Controls.Add(Button(Text = 'Press Me',Left=20,Top=20))
>>> form.ShowDialog()
Good luck with IronPython if you decide to try it out.
Source: David Hayden ( Florida ASP.NET Developer )