I am considering creating a GUI-based tool that I want to be cross-platform. I've dismissed Java, as I personally do not like Swing. I'm currently considering C# and using Mono to make it cross-platform. However I'm wondering if cross-platform languages like Python can offer me a decent GUI development environment.
I've made numerous UI's in wxPython [1] and would highly recommend it. I used to build in VisualC++/MFC, then discovered wxWidgets/C++ and finally moved onto wxPython. I find I'm able to get working GUIs in no time at all with wxPython compared to the other methods and with almost no effort, the same source works on Linux and the Mac* (sometimes you need some tweaks for visual anomalies).
*I generally develop under Windows in case you hadn't guessed.
There's a tool, wxDesigner [2], you can use to generate the layout for you or alternatively, you can play with it programmatically. Either way, layout under wxWidgets is done using Sizers [3]. They're quite a powerful way of laying out a GUI and once set up correctly, will automatically resize your controls appropriately for you.
There's a nice little tutorial on sourceforge [4] with some good examples of what you can do with sizers.
There's another tool, wxGlade [5], I've just discovered which does what wxDesigner does, but for free from a quick trial, might actually be better as well.
..aaaand another tool - Dialog Blocks [6].
wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first.
-- Guido van Rossum
From http://www.wxpython.org/quotes.php
You could try PyQt [1] This uses the Qt toolkit for the GUI but you write your program in python.
Qt Designer [2] can be used to create GUIs graphically for use with PyQt
[1] http://wiki.python.org/moin/PyQtI'll go ahead and field a negative answer (there doesn't seem to be one yet).
Python is not ideal for GUI development. The development tools for GUI development haven't been built up around Python the same way that they have been around enterprise-targeted languages like C#.
There are easily accessible tools to facilitate the development of professional looking GUIs in C#. You can download Visual Studio .NET or Mono and figure out how to build a decent GUI within an hour. Getting the same level of professionalism with the Python toolchain requires substantially more investment.
There are excellent GUI options for Python. wxPython is a great place to start, pyQT is good if you have spare money.
The biggest issue I've seen is having a tool that lets you layout a form with the ease of Visual Studio -- but I think pyQT has that one resolved, and wxWindows has a version you can pay for.
As others have said, wxPython is a good GUI library. One thing that isn't mentioned much is that you can combine wxPython with wxGlade to create many "drag and drop" programs.
wxGlade lets you quickly create the framework of your program; you don't have to worry about any of the working code at first. You can just create the visual look until you get it just right. Once that's done, then you start working on the actual coding, but you already have the GUI framework laid out for you. All you have to provide is the programming logic to make your application work.
One benefit of using Python for applications in general is the interpreted environment. You don't have to do the check/compile/run cycle everytime. You can quickly make changes and see them nearly instantaneously, which greatly speeds up development.
Additionally, if you need to speed up the program, you can always write certain parts in C/C++ and pre-compile them. The cPickle module is an example of this. But for many GUI programs, the application will be waiting on the user so speed is usually not an issue.
Python is excellent for gui development
Speed of execution is less important than speed of development, GUIs change a lot.
GUIs generally involve dealing with text and storing state - ideal pythonisms
If your app is in c++/c#, then having the gui written in a different langauge enforces gui/logic separation.
Options are: wxpython/pyQT - equally good, all the functionality of wx/qt from python, both the designers can spit out native python implementations.
IronPython - .net implmentation of python so all winforms and wpf directly from python. You get all the .net libs but only a subset of the native python ones, but it is very easy to mix python gui with other parts of the app writen in c# etc.
To asnwer your question directly:
Yes, Python is excellent for GUI development. Python is dynamic and extremely flexible, traits that are very important for GUI development where one often needs to write a lot of boilerplate code. The bindings for some popular cross-platform GUI libraries (wx, Qt, etc.) are mature, stable, actively developed and well supported.
I've found performance of Python GUI bindings to be good (I'm personally using wxPython and have already written a few functional GUIs both for work and personal use). But if you want to improve it even further, I'm sure it's not too hard to combine the Python binding code with C++ code (using the wxWidgets C++ libarary itself, for instance). Anyhow, I suspect this won't be a problem for you.
Check out the Traits [1] library from Enthought. It's a way of describing different properties of objects, views of those properties, and dynamically updating views. I'm not really doing it justice, but it's an extremely flexible, rapid-development library. Plus, it leads to reusable and extensible code. I've written a couple minor scientific applications in Traits, and I have found it to be an absolute dream, as it lets me focus on the data model rather than the UI.
[1] http://code.enthought.com/projects/traits/This is a pretty old topic and some new frameworks have risen since then.
My personal favorite is PySide, the LGPL Python bindings for Qt. It has many cool features, it looks cool for cross-platform apps, and it has a nice WYSIWYG designer (QtDevelop, QtCreator).
You can find a nice tutorial here: http://zetcode.com/gui/pysidetutorial/ and another tutorial here: http://mspadaru.wordpress.com/youtube-player/ witch explains the development of a PySide app from setting up the tools to compiling the app for Linux and Windows
Go for it. I think you will find it an easier cross platform route than C#+Mono. Check out Tkinter [1], the Python interface to Tcl/Tk. Tkinter is available for Unix, Windows and Macintosh. It has been a while but as I recall there were a couple of well done IDEs for development and GUI layout.
[1] http://docs.python.org/lib/module-Tkinter.htmlwxPython is full of bugs on anything besides Windows. PyGTK2 is probably the best GUI toolkit but I don't know on what platforms it is supported, probably everywhere gnome is.
I've actually done similar research lately as many of the artist I work with work on Macs. What I found is that wxPython seems pretty robust. My goals were for internal tools development, so I was looking for a more efficient development language than C# and Java.
I'm not an expert in wxPython, but if you are interested in GUI development in Python, I would give this API a try, or at least some research time.
I made a similar/related question a while ago, might serve as reference:
I think at this moment (April 2011), PySide [1] developed by the QT owner - Nokia is the best choice, it just reached 1.0 release and it provides the same API as PyQt.
[1] http://www.pyside.org/You should take a look at IronPython. With it you can use the .NET Framework and I'm pretty sure somehow Mono too!
http://www.google.de/search?hl=en&pwst=1&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=ironpython&spell=1 [1]
[1] http://www.google.de/search?hl=en&pwst=1&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=ironpython&spell=1Dabo is a Python framework for cross-platform GUI app development. It starts with wxPython for the UI, but completely wraps it in order to eliminate the ugliness and inconsistency that comes with wxPython.
Check out some of the screencasts of Dabo in action at http://dabodev.com/documentation
there are numerous GUI tool-kits available for python. Some examples are: tkinter, pyqt, pygtk, and wxwidgets.
I belive that Chandler ( the Calendar sharing app from Mitch Kapors Open Source Applications Foundation - http://www.chandlerproject.com) is written entirely in Python and wxWidgets.
Can't add anything else as I'm not a Python guy.
With jython you could use Java Swing. 100% cross platform and everybody loves swing - right ;-)
Getting back to a dislike of swing, you can use swing "but not as we know it Jim" by using Groovy and the SwingBuilder, this is a very nice piece of kit and obviously works on any machine with a jvm.