Python vs. IronPython : Round 2
June 19, 2007Yesterday I let IronPython battle it out with TileCache, which was written for CPython and CGI. IronPython was stumbling — not seeming like a drop-in replacement for CPython yet — but I didn’t quite call the fight. I wanted to port TileCache’s CGI library calls to ASP.NET calls and see what I came up with.
After trivially porting TileCache’s CGI code, I discovered a new issue. IronPython’s lacks support for ”os.access.”. TileCache requires “os.access”. I’m not sure where this method normally lives. Its not defined in the “os” module of the Standard Library, but it works from CPython. AFAIK, its magic.
With a bit more research, and I stumbled upon FePy. “The FePy project aims to provide enhancements and add-ons for IronPython, an implementation of Python programming language.” They’ve already addressed my “hashlib” problem, providing a custom .NET module for it and for “socket.” They’ve also identified and patched 3 issues in IronPython, and 6 issues in the Python Standard Library when used with IronPython.
FePy’s patches should fix my issue. They’ve added “os.access” directly into the IronPython DLL. However, FePy lists their patched IronPython DLL version as 1.1, while ASP.NET Futures seems to use a Version 2.0. The thought ”with a little more effort, I can make this work” was beginning to feel familiar. I’ll wait till FePy moves to 2.0.
Winners: the FePy developers, notably Seo Sanghyeon, for relentlessly discovering and fixing IronPython bugs before MS can
Losers: IronPython, for stumbling twice on a mere 44k of code (+400k of relevant, standard libraries)