IronPython editor postscript

I earlier tried various editors I was considering using to teach IronPython.  One of the glaring omissions was Eclipse/PyDev, which has built-in support and is a very well-known IDE (particularly in the Java community).  The main reason that I skipped Eclipse was that when I was searching for an IDE to use professionally about five years ago I tried Eclipse (for Python, C, and C++ development) and I really hated it – the IDE was very slow (especially to launch), it was very Java-centric, and just didn’t suit me at all.  I’d briefly tried Eclipse before that as well, with similar results.

Over the last few days, I decided that I was probably being unfair, and since this was a choice for my students rather than for me personally, I really ought to try Eclipse (with the PyDev extensions).  I also noticed recently a post about using IronPython with NetBeans – I’d heard of NetBeans before, but only in a Java development context, and since I stay as far away from Java development as I can, I had no experience with NetBeans at all.

Eclipse/PyDev

I was right to re-examine Eclipse.  The things that I remember bothering me so much five years ago (speed, the interface) seem to have been completely addressed, and it looks like a quite usable product.  When adding PyDev (which was quite simple), there’s support for IronPython that appears completely built-in (although it’s still obvious that Java is the #1 choice).  It seemed like a quite reasonable contender, unlike I tried to actually configure it to use the IronPython interpreter (which has to be done manually).  I was using a completely standard, fresh, installation of IronPython 2.0.1 (from the .msi) installed in the default location (here ‘C:\Programs\Iron Python 2.0.1′) with ‘Eclipse Classic 3.5′ and version 6u14 of the Java Runtime.

I believe that, in theory, you can click the automatic configuration button, or manually locate the IronPython interpreter, and it’ll just work.  Unfortunately, for me nothing seemed to work.  The error message indicated that having spaces on the Eclipse path could be a problem (which seems pretty shocking in 2009), so I tried moving Eclipse to C:\, which didn’t help.  I tried moving IronPython to C:\ (and renaming the folder to have no spaces), and that didn’t help.  I imagine that someone more familiar with Eclipse, or with PyDev with CPython/Jython, might have been able to solve this easily.  However, if I can’t figure it out in 10 minutes, then I am not at all comfortable with telling my first-year students to use it (even though we walk through the installation together, some of them will need to do that by themselves as well).

NetBeans

It wasn’t entirely clear which version of NetBeans to use, but I presumed that the most appropriate was NetBeans 6.7 “Python EA2″.  Although the post I saw indicated that you needed to rename ipy.exe and ipyw.exe, I found that just selecting ipy.exe worked fine.  I quite liked this IDE, and it appeared (although I didn’t use it for long) that using IronPython worked fine.   There’s no graphical form designer, so NetBeans is in the same category as Komodo Edit (which I discussed previously).  In many ways, it’s probably a better choice than Komodo Edit (in that the IronPython integration is simpler to do, although it does require that Java is installed), although I don’t know if there is any way to provide .NET auto-complete.  It’s a fairly full-featured IDE, like Komodo and unlike DIE, which would normally be a positive, but in this specific case (first-year programming students) is actually a negative, since they need to ignore all the ‘team’ functionality, and you have to work within projects (which is true of Visual Studio as well).  This is an “early access” version – since I’m not familiar with NetBeans I don’t know how unreliable that makes it – it makes me a little nervous about suggesting it to students, but I certainly didn’t have any trouble with it myself.

Conclusion

If you’re able to get Eclipse/PyDev installed, then I suspect it might slightly beat out my previous recommendations of Komodo Edit and DIE; since I didn’t get it working, I can’t recommend it to the students.  NetBeans, however, will get added to the list of suggested tools (alongside Komodo Edit and DIE).  If I wasn’t so familiar with Komodo Edit, I’d probably use NetBeans as the editor I use to demonstrate, but it didn’t wow me so much that it overcomes the familiarity.

About these ads

6 responses to this post.

  1. […] I considered seven different editors/IDEs – there are a couple of others, but they either seemed too young (e.g. IronPython IDE, IronEditor), or inappropriate for other reasons (e.g. ZeusEdit is not free, I can’t stand Eclipse.  UPDATE: I decided to try Eclipse and Netbeans after all). […]

  2. Posted by Fabio Zadrozny on July 17, 2009 at 10:02 pm

    Hi Tony,

    Unfortunately, the problem with Iron Python in pydev is that it needs Iron Python 2.6 (version 2.0 won’t work as you saw — and I agree that a better error message should be there, 1.4.7 was the first release with that integration, and some things will already be improved for the next pydev version — the spaces in paths, which was a bug in earlier versions of Pydev shouldn’t really matter anymore, so, that message has to be removed).

    There are more details at pydev.blogspot.com/2009/06/testing-on-pydev-147-ironpython.html on why IronPython 2.6 is needed and how to have code-completion for .NET libraries.

    Best Regards,

    Fabio

  3. An added complication with NetBeans that I didn’t notice while testing previously is that it does *not* work with IronPython 2.6b1, because 2.6b1 is missing the “code” and “codeop” modules (although it does seem that simply copying them into the Lib folder works). I’ve tried to find out why these have vanished, but haven’t been able to do far.

    That means that NetBeans means using 2.0.1, like Eclipse/PyDev requires using 2.6.

  4. Hi Fabio – thanks for the tip (I wish it had been in the release notes on the download page – would have saved me much trial and error!).

    I tried Eclipse/PyDev with 2.6b1, and it does seem to work well (including the “auto config”, which is nice).

    I think Eclipse/PyDev and NetBeans fall into pretty similar categories (good support, very full-featured, fairly simple setup, but require Java to be installed first, and only work with a particular version).

  5. Posted by Fabio Zadrozny on July 19, 2009 at 10:51 pm

    I’m in the process of updating the homepage… but anyways, as it’s a limitation (because pydev relies on sys._getframe()), it should be much more explicit about that.

  6. The NetBeans issue (unable to import code/codeop) has been fixed in 2.6b2, so it appears to work fine in 2.0.2 and 2.6b2 now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: