Saturday, August 15, 2009

IronPython on non-Windows system?

I was reading a post on Monologue this morning and there was a post getting IronPython & IronRuby into Redhat (I'm assuming the rpm repositories) and it got me thinking about this. My biggest question to this is, WHY?

Don't get me wrong, I use both Python and IronPython at work for various tasks. But at work, I am on a Windows machine. They both have their advantages. With IronPython, the main advantage that I see is its use with the .NET Office Interop libraries for accessing Powerpoint, Word, and Excel for automation work. Yes, Python is capable of interacting with Office too but there is a bit more prep work involved. Other than this, there isn't much that IronPython can do that cPython can't do and vice-versa.

With that said, I go back to my original question. Why port IronPython (or Iron anything for that matter) to a non-Windows system. Both Python and Ruby are already ported to the vast majority of non-Windows systems including some of the lesser known systems. And since Microsoft Office is only on Windows (and Mac but I'm not sure that Mono can or will work with it on a mac), I don't see any reason to bother.

But those of you out there who may be reading this and may be interested in porting something like this for whatever reason, don't let me stop you... ;)

4 comments:

  1. Because IronPython and IronRuby both work fine on Mono and are just as useful in environments using Mono as they are in environments using .NET.

    ReplyDelete
  2. I don't know if it is a good reason, but here it is:

    http://wp.colliertech.org/cj/?p=175

    I would like to see Perl6 run on Mono one day ;)

    ReplyDelete
  3. @Michael Foord,
    Yes they work fine with Mono. But does IronPython offer anything more over cPython in a Non-Windows world? That's what I am trying to understand....

    ReplyDelete
  4. Well, advantages IronPython has over CPython:

    * AppDomains (restrict security priveleges of untrusted code)
    * Access to .NET / Mono libraries
    * Threading without the GIL (scale pure-Python code across multiple cores)
    * Easily create applications with multiple isolated Python engines
    * Easy to compile applications to binary and make binary distributions
    * Much easier to extend with C# than CPython is with C
    * Through the DLR you get interoperability with C# / F# / IronRuby / IronScheme...

    Some of these are more compelling than others of course, YMMV. :-)

    In addition to which IronPython can be used as an easy to embed scripting language for applications written in C#. *If* Mono is useful (which I think it is) *then* IronPython is useful...

    ReplyDelete