Monday, June 22, 2009

A Good Mix 12: Upcoming Presentations, XML Namespaces, ArcGIS and the Hungarian Phrasebook

Yet another selection of blog entries and articles relating to IronPython from the last few weeks.
The Coding Geekette (Sarah Dutkiewicz) is a regular at .NET and Python conferences speaking, amongst other things, about IronPython. In this blog entry she lists her forthcoming talks:
There is also quite a bit of IronPython content at the forthcoming EuroPython 2009 in Birmingam (28th June to 4th July): an IronPython tutorial, ArcGIS and IronPython talk, Introduction to IronPython talk, Ironclad talk and a general Python VM panel discussion.
A Japanese blog demonstrating how to load and save XML from IronPython - using the .NET APIs and working with namespaces. In this case he is iterating through a directory of XHTML files and adding valid namespace declarations.
A short snippet of code showing how to work with .NET APIs that take delegates from IronPython.
Another short 'reminder' blog entry from Simon Taylor, who seems to be having fun with IronPython. String formatting is Python 101 - but is not something you will automatically understand when coming from C#. Interestingly the new string formatting in Python 3.0 (which I'm not really a fan of) is lifted straight from C#.
Silverlight (the browser plugin) is great fun to program with IronPython, but has the disadvantage of it not being possible to compile assemblies instead of deploying source code. One developer at least is keen to change this and has started the "Hungarian Phrasebook" project to create an IronPython pre-compiler for Silverlight.

This is a topic I've looked into a bit, and discussed on the IronPython mailing list, and came to the conclusion it's not easily possible. (There is no cross-compiling support in Reflection.Emit and the APIs used by the Python compiler Pyc will only save to disk which doesn't work in Silverlight.) There is no code in the project yet but I hope it works.
The perrygeo blogger would love to use IronPython with ArcGIS, but discovers that with IronPython 2.0 he has to explicitly call through the interfaces for most of the APIs, making the code painfully verbose.
And then he tries IronPython 2.6 instead of IronPython 2.0 and finds it works as expected. Joy and delight ensues...
Works perfectly now. So IronPython 2.6 promises to be a viable option for extending ArcGIS. My enthusiasm has been renewed.
Nice to finish on a happy note.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.