Posts

Visual Micro-Blogging Tool - with IronPython Scripting

VMBT is a Visual Micro-Blogging Tool (it looks like a combination of Twitter and IRC in a single client). You can see some screenshots of it in action here . In a recent post the developer announced an exciting new feature coming soon: New Major Feature Next version of VMBT will include a customization feature via the Dynamic Language Runtime functionality of .NET. This allows you (the user) to enhance the client with your own code. Scripting through Python allows you to do your own thing on events like chat on public, friends timeline or searches. You can also control the Twitter-API from this scripting language and create your own windows, manipulate statuses/users appearance in the client’s chat window. A simple example of this functionality would be to create a script that follows everyone who mentions you or something you define. Another example is a script that stores all URLs that are mentioned in a global URL-list, or like the native functionality already does, expand tinyurls...

Checkin Comments for IronPython Source

Right from the start IronPython has been open source, and it was the first project to be licensed with the OSI Approved Microsoft Public License . Despite having the source code available , IronPython and the DLR are actually developed internally at Microsoft and from time to time the latest sources are 'dropped over the wall' and synced with the public repositories on Codeplex. Because some of the original checkin messages sometimes refer to secret projects (like the work to make IronPython compatible with Silverlight before Silverlight was released) the commit messages on the public repositories have always been the wonderfully descriptive “Latest IP sources migrated to CodePlex TFS”. This 'open source project with secret commit messages' has long annoyed me, and it is great news that the IronPython team have finally capitulated to the nagging of me and others on the mailing list. Harry Pierson explains the new system: Checkin Comments for IronPython Source Since mid...

FePy Status Update (and IronPython on Mono)

FePy is the community edition of IronPython maintained by Seo Sanghyeon. It includes the Python standard library plus various bugfixes and compatibility wrappers for Python modules not normally available with IronPython. More importantly it is intended to be compiled with Mono. (Although the FePy binaries work on Windows and the Windows binaries work on Mono - which is the point of Mono.) The latest released binary versions of FePy are for IronPython 1 and IronPython 2.0 Alpha 5. These are the versions that are included with Mono. Unfortunately they're pretty old. Problems with the Mono compiler have prevented IronPython 2 being compiled with Mono. These aren't always bugs; they're usually places where the .NET compiler has a different interpretation of the C# standards to the Mono compiler, or even places where the IronPython sources rely on features of the .NET compiler that appear to actually violate the ECMA language specification for C# . That aside Seo says that he r...

Nose 0.11 - Python test framework with IronPython support

Python is blessed with many popular and powerful test frameworks. One of the most popular is nose , which has just released version 0.11. Back in March I reported the partial success that Darrell Hawley had running nose with IronPython . Well, there's more news. Release Notes for Nose 0.11 Nifty New Features (summary) Better support for IronPython. (Note that Nose has supported Jython for several versions now.) Thanks to Kevin Mitchell, nose is now more compatible with IronPython. IronPython is still not fully supported, but it should work. If you’d like to improve nose’s support for IronPython further, please join the nose developer’s list and volunteer to become the IronPython maintainer for nose! Of course the Python standard library testing framework unittest works with IronPython and has had some interesting improvements recently. More details on that soon on my other blog .

Steve Gilham Reviews IronPython in Action

Steve Gilham has been blogging on and off about IronPython pretty much since the first release of IronPython. We asked him to review IronPython in Action , but it turned out he had already bought it and was intending to review it anyway! This is an extract from the review he has posted: Book: IronPython in Action by Foord & Muirhead The task the authors set themselves is an heroic one -- to teach Python to .net programmers, and .net to Python programmers, and, just in case that was not enough, several of the more outré parts of .net, and good programming practices, for just about everybody as well. What makes this a great book is that, in the course of about 450 pages, with copious external citations, they actually succeed. Part of the secret of the success is that this (like Programming in Scala ) is not a beginner's book and assumes the reader has a degree of familiarity with basic programming concepts -- for example, the Python if , for and while statements are covered to...

A Fairly Meaningless Server Performance Comparison

An interesting article by James Gardner comparing the performance of IronPython, Jython, Scala and CPython for serving web pages. Not only does it carry the usual caveats of all benchmarking and performance comparisons, but the version of IronPython used is the very old IronPython 2.0 Alpha 5 which still comes with Mono. UPDATE: it turns out that not only is the article using an old version of IronPython, but it advises installing Mono 1.9.1 because of the handy universal installer for Linux. Whilst this is indeed handy it is also outdated (the installer used to be built with a tool called BitRock which is non-free). The latest version of Mono is 2.4. That aside it is still an interesting read and includes instructions on how to get Mono installed and have IronPython working with the Python standard library on Linux: IronPython, Jython, Scala and Python: A Fairly Meaningless Server Performance Comparison IronPython 2.0 is a full implementation of Python 2.5 targetting the .NET platform...

A Good Mix 5: Cookbook entries, ADODBAPI and IronPython with Asterisk

Only the finest selection of articles and blog posts on IronPython and related topics. Connection String Editor A recipe in the IronPython Cookbook showing how you can prompt the user for a connection string (for connecting to databases) using a built-in connection string editor dialog box from the Microsoft .NET Framework. IPY as AMI client thru AMIConnector A blog entry demonstrating the power of the interactive interpreter for exploring new libraries. This entry investigates AmiConnector , which is a .NET library for working with the Asterisk Manager. Kudos to Vernon Cole Dave Fugate, IronPython testing and infrastructure guy, pays homage to Vernon Cole for pywin32's adodbapi which runs under both CPython and IronPython. The tests have now been added to the IronPython test infrastructure so that the IronPython team will get early warning if they break it. Dave comments " Now I just need to setup Northwind databases on 40+ test machines... ". Self-executable scripts A...

First Moonlight 2.0 Preview is Out

Serendiptiously following on from an entry on Silverlight comes big news from the Moonlight project, the Mono port of Silverlight for Linux. Silverlight is Microsoft's Rich Internet Application browser plugin, which allows you to script the browser with Python! It's great fun to program, but the Microsoft version only works on Apple Mac OS X and Windows computers. Microsoft has collaborated with the Mono team to produce a Linux version built on Mono; providing them with tests and multimedia codecs - plus open sourcing some of the GUI controls. Moonlight 2.0 Preview is a preview release of Moonlight targeting binary compatibility with Silverlight 2.0 applications and working as plugin for the Firefox browser: First Moonlight 2.0 Preview is Out After a loving incubation period, the Moonlight 2.0 preview, an open source implementation of Microsoft's Silverlight for Linux has been released. This is really the release I have been looking for since Microsoft first introduced Sil...

DLR Hosting in Silverlight

The Dynamic Language Runtime is the framework created by Microsoft for building and running dynamic languages on the .NET framework on Mono. The major language implemented on top of the DLR is IronPython, with IronRuby rapidly heading towards completion. As well as being a fine language for application development, the DLR has been designed to be easy to embed into .NET applications; to provide user scripting and extensible architectures. The .NET framework comes in three distinct varieties: The 'standard' .NET framework for the desktop and server computers The .NET compact framework for running on mobile and gaming devices like the XBox 360 The CoreCLR which is included in Silverlight, the browser plugin Of these three the DLR will run on the first and third. The compact framework lacks the Reflection.Emit libraries which the DLR uses for code generation. Just as IronPython can be embedded in .NET applications it can also be embedded into Rich Internet Applications through Si...

Lang.NET and Microsoft Dynamics

Image
The Microsoft Lang.NET Conference 2009 has come and gone. The conference is not just about Microsoft languages and platforms, but has speakers on Smalltalk, the JVM and more: Lang.NET is a forum for discussion of programming languages, managed execution environments, compilers, multi-language libraries, and integrated development environments. It provides an excellent opportunity for programming language implementers and researchers from both industry and academia to meet and share their knowledge, experience, and suggestions for future research and development in the area of programming languages. The best news from the conference was the arrival of IronPython in Action of course. In this photo Jimmy Schementi is reading the dead-tree version: There were plenty of interesting talks. You can watch the videos here . One of the talks is about a Microsoft product which ships IronPython (another one - IronPython is turning up in more and more places in the Microsoft ecosystem): Microso...

Getting Started with IronPython - Part 1 where to start

A blog entry by Dror Helper on how to get started with IronPython. Getting Started with IronPython - Part 1 where to start It seems to me that there is a lot of talk about the new .NET Dynamic Languages lately. Because I wanted to see what the DLR was all about I will learn IronPython as part of my quest to learn new programming languages. When I learn a new programming language I look up three “ingredients”: a Book, tutorials/code examples and a project. It also helps if to have a “programmer friendly” IDE that helps writing and debugging. Learning from examples scattered around the internet is possible, but I found that I learn new technology quicker when these ingredients are available. Luckily with IronPython there was not shortage of resources. He recommends Dive into Python for learning Python and the SharpDevelop IDE . He also links to several online resources for learning IronPython.

CodeCast Episode 18: IronPython and Dynamic Languages with Harry Pierson

Harry Pierson (IronPython PM) and I are gradually working our way through all the .NET podcasts. This one (37 minutes) is the second part of Harry Pierson talking about IronPython and dynamic languages on CodeCast: CodeCast Episode 18: IronPython and Dynamic Languages with Harry Pierson This episode includes Ken Levy interviewing Microsoft’s IronPython program manager Harry Pierson, a part 2 from CodeCast #13. This is an extended in depth discussion with Harry giving examples of how dynamic languages are useful to any VB or C# developer, and how the next version of VS (version 2010) will include new features for integrating dynamic language programming within a VB or C# project.

ZLIB and .NET

Steve Gilham has been involved in some odd experiments with a codebase involving IronPython, Jython and Scala (with Erlang occasionally in the mix as well). His latest post shows the IronPython code needed for ZLIB compression on .NET, even though it isn't provided directly by the framework: ZLIB and .Net A recurring problem in several of the projects I have in the pipeline is the matter of handling ZLIB. Java, though java.util.zip offers ZLIB compression with a 32k byte window (but no means of tuning the window) through the DeflaterOutputStream. The .Net framework doesn't offer direct ZLIB at all, but provides naked Deflate via System.IO.Compression.DeflateStream . That gives us enough to be able to reflate the output of a ZLIB deflation, since a ZLIB is a 2 byte header, a deflate section and finally a 4 byte checksum. That works fine; but the converse, taking a .Net deflate and adding the appropriate top and tail took a bit of getting to work. First pitfall -- the Inflater...

Book: IronPython Studio in Practice (Polish)

IronPython in Action was the first book in English on IronPython (and is still the only one, although Pro IronPython is due out later this year). IronPython in Action wasn't the first book on IronPython though; that distinction belongs to IronPython (Windows Script Programming) , in Japanese. There is now another book on IronPython: IronPython Studio in Practise by Mysior Marian. This book is 172 pages and in Polish, so its proper title is: IronPython Studio w praktyce . The translated description reads as follows: The book presents a new approach to Python, the use of visual tools and libraries offered by the package, and Microsoft Visual Studio. NET Framework. The new environment for building applications in Python, which is a package of IronPython Studio, simplifies programming, supporting graphic designer tools and libraries ustandartyzowanymi known languages such as C # and Visual Basic. It completely new quality to the language Python. The publication is addressed to peo...

Using IronPython for Converters in Silverlight

Another blog entry from David Seruyange on using IronPython with Silverlight, and another example of using IronPython for binding dynamic types in WPF . Using IronPython for Converters in Silverlight The concept is a really nice one but I’m not wild about having to write a class that implements the IValueConverter interface every time I need some ad-hoc tweaking of the values I get from being data bound and how I’d like to use them within XAML. What set me off this track was a case where I simply needed to invert a boolean – what should just be “ not myvalue ” ended up requiring a class, an interface, and so on. Dynamic languages excel at this sort of thing and since they support the ability to evaluate code on the fly I thought it would make sense to write a single implementation of IValueConverter and host Python inside of it to evaluate binding expressions that are passed in. No magic, just instantiate the Python runtime and then proceed to leverage it in the Convert phase by taki...

A Good Mix 4: NWSGI, AutoCAD, Another ctypes and C# in Depth

Another fine selection of IronPython related links for your delectation. NWSGI 1.1 Preview 1 NWSGI is " a .NET implementation of the Python WSGI specification for IronPython. It is implemented as an ASP.NET HttpHandler for use with IIS 6 and 7 " created by Jeff Hardy . The goal is to be able to run Python applications like Django, Trac and Pylons on IronPython. It can also be used on the Microsoft Azure (cloud computing) platform. This new release is a pre-release which depends on IronPython 2.6 Alpha 1 . The following features/changes have been added to NWSGI: Add " callable " attribute to scriptMapping to specify the callable for that script. Allow for "virtual" scripts by extending callables to allow for package.module:callable. This can avoid creating a .wsgi file in many scenarios. This can be used with wildcard mappings by specifying wildcardModule=":callable". Use the "debug" attribute on system.web/compilation instead of on ws...

IronPython 2.6 Release Roadmap

Today the IronPython team put a roadmap online highlighting the major new features and an approximate time frame for betas. 2.6 Release Roadmap New features CPython 2.6 compatibility Improved startup time New built-in modules that were previously missing: ctypes heapq New IronPython features: meta-class method __clrtype__ for better .NET interop support Cached subtypes Adaptive interpreter (related to improved startup time) New built-in profiler Optional sys._getframe support Tenative release plan IronPython 2.6 Alpha 1 - Mar 26, 2009 At least 50% of 2.6 tests pass that passed under 2.5. Many of the big new features implemented. IronPython 2.6 Beta 1 - End of May Mostly feature complete - all 2.6 features, abstract interpreter, cached new types, __clrtype__ , ctypes IronPython 2.6 Beta 2 - ~2 months later Primarily bug fixes on top of Beta 1. Also maybe some top small features as requested by users. IronPython 2.6 RC 1 - ~1.5 months later Build is truly a candidate for release. If no...

Why do I use IronPython?

Davy Mitchell has written a brief blog entry explaining why he uses IronPython: Why do I use IronPython? 1) Time is critical so that fact I can learn more .Net and Python at the same time is just great. 2) The Framework is substantial, stable and well maintained. In CPython I am frustrated by non-core libraries getting out of sync (some 2.4, some 2.5 etc months apart). 3) Python is a good application language, a good scripting language and it is currently the best and most mature one for .Net. The IronPython team are helpful and responsive too. It is also maturing very well. 4) IronPython makes it easier to get the best out of Windows - it is a more natural fit than CPython. 5) Winforms is nicer than WxPython :-) wxPython itself is great but can’t disguise the C style API enough for me. Nightmares of MFC development return too quickly!! 6) Silverlight is a great solution for Python in a browser. Nothing comes close in the CPython world. Don't get me wrong - I have 3 versions of CP...

IronPython Podcasts and Videos

Last week I was very fortunate to record a podcast on IronPython and dynamic languages on .NET with Scott Hanselman . Scott is a well known developer who works for Microsoft, and one of the authors of Professional ASP.NET MVC 1.0 . In this 46 minutes podcast we discuss why dynamic languages are interesting and gaining in popularity, and how IronPython fits into the .NET world - touching on why dynamic languages are easier to test and using IronPython to allow user scripting of .NET applications. Naturally both IronPython in Action and Resolver One get mentions along the way. Hanselminutes Podcast 159 - IronPython in Action with Michael Foord Michael Foord makes his living as a Python programmer. More specifically as an IronPython programmer. He chats with me about his company's use of IronPython, the DLR and why they picked Python over C# or VB. I've also recorded an episode with a new .NET podcast called Sod This , which describes itself as " brain burps for the tech sa...

Resolver One, Digipede and Resolver One on Digipede

Resolver One is a programmable spreadsheet created by Resolver Systems . It is mainly written in IronPython, programmable with IronPython and is the project I've spent the last three years working on. Digipede is a grid computing platform for Windows and .NET, allowing you to easily distribute jobs between servers, clusters and desktop computers. This IronPython-URLs entry has news about Resolver One and Digipede separately, and some of the possibilities when you bring them together. Resolver One 1.4.5 Released A new release of Resolver One. The major new features in this release are that we now only have one installer (instead of six different ones) with features activated by license. There are also 54 new financial functions , the ability to set alignment of text in cells, and you can now create new worksheets (and change the selected worksheet) inside button handlers. There are also a host of minor bugfixes as usual, including the ability to embed the Resolver One spreadsheet...