Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CPython vs. Jython vs. IronPython for cross-platform GUI development [closed]

I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose.

I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows.

My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cross-platform as possible

(I know already that CPython and Jython are cross-platform-friendly, but what about IronPython+Mono?)

So - the question is about GUI - what should I choose?

like image 597
Vladimir Keleshev Avatar asked Jul 26 '10 18:07

Vladimir Keleshev


3 Answers

IronPython with Mono is cross platform - to whatever platforms supported by Mono, and for the feature set supported by Mono (which pretty much means Windows Forms is supported fairly well). Other options for GUI toolkits are available, however, which may provide better "cross platform" capabilities, or at least a better feel on non-Windows platforms.

CPython will depend on the GUI suite you choose. Personally, I've found CPython with PyQt to be the most usable, cross platform GUI option from Python. It's very powerful, feature-rich, and works quite well.

Jython will work, but I personally don't like the GUI options as much (this is a 100% personal preference, however).

like image 119
Reed Copsey Avatar answered Oct 13 '22 00:10

Reed Copsey


I'd say that if cross-platform is a goal, forget IronPython. A lot of people hate the dependency hell it causes so it'll be too much work to get it up in running in some OSes/distributions. Jython will suffer this also, albeit to a lesser degree.

like image 42
Gianni Avatar answered Oct 13 '22 00:10

Gianni


Well, Mono does not come with the base of most Linux distributions. It's not a terribly lightweight dependency either, and I think Java is considerably more likely for people to already have. Would you plan on using "Winforms" with Mono? If so, and you don't have experience with Winforms, read about what others have to say :-) The other .NET GUI toolkit is WPF, which unfortunately Mono has no plans to implement.

Jython would be better too, because you can use SWT, which renders native widgets and provides lots of layout possibilities easily. Or you can use Jython with Swing, or whatever else -- even AWT if you love ugliness.

I really like wxPython (which you can use with CPython, which is on most distros by default), because it renders good-looking native widgets in OSX, Windows and Linux (I've only seen the Gnome widgets in person). wxPython is by far the easiest to use GUI toolkit I've used -- even programatically (i.e. layout without Glade or similar). I've also used SWT, which I found quite nice, and Swing, which I personally don't really like the looks of, and Winforms, which was a nightmare to try to do even simple layouts with.

Here's a quick comparison of the existence of the interpreter/language runtime by OS

  • CPython
    • Windows - Probably not installed, and you'd have to make a non-python installer install it with your software :-P
    • Linux - Probably installed (Ubuntu, Gentoo and RedHat all have system tools that are written in Python and run on CPython)
    • Mac - Preinstalled on OSX
  • Jython
    • Windows - Probably installed at some point in my experience, though it doesn't come with
    • Linux - Probably installed, but more importantly nobody would hate you for depending on it like Mono
    • Mac - Preinstalled on OSX ("Mac OS X Leopard comes with J2SE 5.0 preinstalled, based on JDK 1.5.0_13_b05" -- Apple's site)
  • IronPython
    • Windows - Will probably run fine because I bet most people have at the very least .NET 2.0 if they have a recent version of Windows
    • Linux - Probably not installed -- the only application with which I've used Mono on Linux was Rasterbator, which worked well but I felt weird putting .NET on Linux
    • Mac - See above

I would choose a GUI toolkit first, since that will very much impact the user experience and overall difficulty (I would choose wxPython but SWT would be a close second) then consider the above as well maybe as a tiebreaker.

like image 33
Hut8 Avatar answered Oct 12 '22 23:10

Hut8