Sunday, September 30, 2007

Python Implementations Matrix

'Someone' (moreati?) over on the 'Misspelled nemesis club' blog has started a Python implementations matrix (spreadsheet). This tracks the different versions and implementations of Python (CPython, Jython, IronPython and PyPy) and what features and libraries they support:
This is a great idea, but is far from being complete.

IronPython on

IronPython features in several places on Microsoft's websites. We covered the Knowledge Tools page, here are a few more:

IronPython in Action: Chapter 5 & 6 Available

Chapters 5 & 6 of "IronPython in Action" join the first four chapters in the Manning Early Access program:

Men of Iron Podcast

Craig Murphy has posted an interview with Michael Foord (uhm... me) on IronPython and the Dynamic Language Runtime and with Dave Verwer on Ruby and IronRuby:
The interviews were both done at Mix UK.

Friday, September 28, 2007

The IronPython 2 Hosting API

Shri Borde has just posted to the IronPython mailing list a link to a document on the IronPython 2 hosting APIs. It is from May, so things have changed a bit since then, but it will still be very useful for anyone embedding IronPython 2 (or any DLR based language) in an application:

Inside IronRuby

Cory Foy has posted a blog entry examining a bit of how IronRuby weaves its magic. All of the entry is interesting, and a lot of it is relevant to IronPython as they share code through the DLR:

Thursday, September 27, 2007

Resolver: The IronPython Spreadsheet

Jon Udell has posted a blog entry and screen cast on a new spreadsheet application written in IronPython:
Entering formulae into a spreadsheetis a form of functional programming, and is overwhelmingly the most common form of 'end user programming' there is. Jon feels that Resolver has something new to offer in this area. Smile

The clr Module

Two more blog entries from Haibo Luo, exploring the IronPython 'clr' module (which is the key to interacting with the .NET framework). Whilst aimed at .NET programmers exploring IronPython for the first time, the entry on 'AddReference' is particularly useful for understanding .NET assemblies and how IronPython works with them:

Wednesday, September 26, 2007

IronPython: Grab the .NET Type

A blog entry by Haibo Luo, on using IronPython to play with .NET types including nested classes, generics and what not:

IronPython/Mono Benchmarks

Seo has done some benchmarks of IronPython 1.1 on Mono, showing how performance has improved from 1.2.3 (February this year), through 1.2.5 (August) to current SVN head:

Monday, September 24, 2007

IronPython: My .NET Exploration Tool

IronPython is a great way to explore .NET assemblies; you can create and experiment with live objects using the interactive interpreter - as *CODER discovered. His blog entry shows using the 'System.Security.Cryptography' assembly:

Sunday, September 23, 2007

A Collection of Links

A collection of links to people discovering IronPython:

Finding the 'greatest common divisor' and fibonaci using IronPython.

Making .NET applications scriptable with IronPython.

Working with the 'Team Foundation Server' through the IronPython interactive interpreter.

A script for interactively working with Oracle. The text is in German, but the code looks straightforward.

And some news that is related to IronPython:

Oh, and I don't think I posted a link here to my set of articles / downloads / online examples for IronPython and Silverlight:

Wednesday, September 19, 2007

CLR Inside & Out: Article on the DLR

The latest issue of 'CLR Inside and Out' has an article on IronPython and the Dynamic Language Runtime:

Sunday, September 16, 2007

Microsoft Knowledge Tools

An interesting quote on the Microsoft Knowledge Tools page:

To make research progress, we build prototype tools and get them into the hands of these types of users. We build many of our prototype tools on top of IronPython, a version of Python for .NET.

Python is like a virus, once it infects one part of a company it spreads everywhere...

Sunday, September 09, 2007

Managed DirectX via IronPython

Andy Sy has put up a three part tutorial on using managed DirectX with IronPython:

Introduction to IronPython and Silverlight

My PyCon UK talk, introducing IronPython on Silverlight, is now online.

This goes through creating a minimal IronPython application for Silverlight and explores the Silverlight APIs. The Web IDE has also been updated and now has several examples built-in. More details to follow, but for the moment:

IronPython in Action

The first four chapters of IronPython in Action, the 'forthcoming' book, are now available via the Manning Early Access Program. The first chapter is free to download.
This means that you get access to the book as it is being written (and get the chance to point out our mistakes!).

The first five chapters (the fifth should be added in the next few days) are an introduction to .NET, a Python tutorial, and then a walk through an example structured Python application illustrating both the Python language and aspects of the .NET framework.

The rest of the book is going to be much more 'recipe style' and cover a wide range of aspects of .NET (ASP, databases, web services, working with Windows and so on), deeper into Python (testing, protocols, metaclasses and so on) and also embedding and extending IronPython.

Make Twitter Talk with IronPython

More code from Davy Mitchell. This time showing how to use the Twitter XML API from IronPython:

IronPython 2.0 Alpha 4 Released

IronPython 2.0 Alpha 4 has just been released:
The most significant changes in this release include:
• Completion of the –X:Interpret mode and its incorporation into the eval and exec functions
• The addition of the -X:PreferComDispatch mode
• Improved performance for the itertools module and the importing of CLR-based modules
• A number of bug fixes
Like previous Alpha releases, quite a bit of refactoring work has been completed and this process is still ongoing. In particular, effort has been put into making .NET interoperability easier for language implementers on the DLR.

-X:PreferComDispatch enables direct support for IDispatch COM objects, and includes support for indexers and output parameters in IDispatch-based calls. This will improve IronPython’s integration with IDispatch-based COM APIs such as in Microsoft Office.

Some of the notable bug fixes included in this release are:
_iter_ is now available for all iterable .NET objects with the exception of System.String (CPython’s string type does not support this)
• isinstance now works on interfaces
• fixed null reference exception when attempting to read a write-only (.NET) property
• fixed invalid IL generated for Python code similar to ‘System.IComparable.CompareTo(1,1)’,

Thursday, September 06, 2007

Semantic Password Generator

JoeSox has written a 'Semantic Password Generator' in IronPython, that uses Wordnet.
Sources and documentation are available.

Wednesday, September 05, 2007

SharePoint, IronPython, and another lesson in the virtue of laziness

A blog entry from Jon Udell on using IronPython to work with documents accessed via a Sharepoint server:
I’m doing an internal project that involves reading several different data sources from a SharePoint 2007 server, merging them, and posting the merged data back to the server. Being lazy, I wanted to use IronPython, write as little code as possible, and do everything dynamically.

Embedding IronPython in a Silverlight (C#) Application

I previously blogged about how to use the IronPython engine from inside a compiled C# Silverlight assembly. This worked fine when you used the resulting assembly from IronPython, but not when used standalone! This was due to a bug in the platform assumptions that the DLR makes, but with help from the IronPython mailing list a workaround has been found:
It means a bit of extra boilerplate code, but hopefully before Silverlight 1.1 final this code will have moved into the DLR and all will be rosy again...

Oh, and by the way... IronRuby is now Live on RubyForge. John Lam has build instructions and news on the latest updates on his blog.

Minimise a Winforms Application to the System Tray

Davy Mitchell has posted an example of how to minimise a Windows Forms application to the system tray:

Silverlight 1.0 Released, Plans for 1.1, and Microsoft / Novell Officially Collaborate on Silverlight for Linux

A flurry of 'official' news on Silverlight.

Silverlight 1.0 has just been released and Scott Guthrie has outlined the plans for Silverlight 1.1:

Now that Silverlight 1.0 is out the door, my team is cranking hard on our Silverlight 1.1 release.

Silverlight 1.1 will include a cross-platform version of the .NET Framework, and will enable a rich .NET development experience in the browser. It will support a WPF programming model for UI - including support for an extensible control model, layout management, data-binding, control skinning, and a rich set of built-in controls. It will also include a subset of the full .NET Framework base class library you use today, including support for collections, generics, IO, threading, globalization, networking (including sockets, web-services and REST support), HTML DOM, XML, local storage, and LINQ.

You'll be able to use any .NET language to develop a Silverlight application (VB, C#, JavaScript, Python, Ruby, Pascal, and more). It is going to really open up a lot of new development opportunities.
Silverlight currently supports Windows and Mac OS. The Mono team have been working hard on a 1.1 compatible release that supports Linux, called Moonlight.

Microsoft have now decided that this will be the 'official' way that Linux is supported and are collaborating with the Mono team on Moonlight:
The highlights of the collaboration are:
  • Microsoft will give Novell access to the test suites for Silverlight to ensure that we have a compatible specification. The same test suite that Microsoft uses for Silverlight.
  • Microsoft will give us access to the Silverlight specifications: details that might be necessary to implement 1.0, beyond what is currently published on the web; and specifications on the 1.1 version of Silverlight as it is updated.
  • Microsoft will make the codecs for video and audio available to users of Moonlight from their web site. The codecs will be binary codecs, and they will only be licensed for use with Moonlight on a web browser (sorry, those are the rules for the Media codecs).
  • Novell will implement Silverlight 1.0 and 1.1 and will distribute it for the major Linux distributions at the time of the shipment. We will offer some kind of one-click install for Linux users (no "Open a terminal and type su followed by your password..." as well as RPM and DEB packages for the major distros and operating systems.
Hopefully all the shared specifications might see full docs for the CoreCLR APIs (shipped with 1.1) arrive a bit sooner...

An important part of developing websites that use Silverlight is the desgn tool Expression Blend. There are free betas of this available, but it is a commercial product and is not cross-platform.

The Mono team are also developing a desgn product, called the Moonlight Designer.

Saturday, September 01, 2007

Bug in IronPython Visual Studio Integration

Aaron Marten manfully owns up to a bug in the IronPython Visual Studio integration, and explains the issues:

Why can't I show the "Add New Items" dialog in a WPF flavored project?

IronPython and Silverlight Resources

Chris Bowen has compiled a list of resources for using IronPython with Silverlight:

IronPython and Silverlight Resources