Ask YC: Toolkit for python desktop applications
I am new in developing desktop applications in python (i.e. coming from a web applications background) and i want to know the best toolkit or framework to develop my desktop applications.I have heard of dabo,but are there any others?
32 comments
[ 4.2 ms ] story [ 77.5 ms ] threadhttp://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4r...
If you don't like that (for example, you don't want to distribute your code as mandated by the GPL but don't want to pay for QT), another good platform-independent GUI toolkit is wxPython:
http://wxpython.org/
http://trolltech.com/developer/knowledgebase/182/
Otherwise I get the impression that most other GUI kits for Python have a "look" of their own and are thus going to stand out a bit on any given platform.
I will certainly be tracking this post to see what suggestions come up - thanks for posting the question.
An added advantage is far faster runtimes thanks to bytecode-compilation (vs the default interpreted-code nature of Python in most circumstances).
You can write your code in Visual Studio on Windows or MonoDevelop on Linux. On Windows, it'll use the native Win32 controls, on Linux Mono will "draw" controls that look like the native ones without actually calling the native binaries - it allows for a huge compatibility boost and still manages to look 99% native (technically it's drawing the exact same native controls, but the drawings aren't perfect).
One really cool thing about it is it comes with a demo app that shows how to do almost anything -- how to use the widgets, how to use threads, how to handle events, etc.. It's basically a big collection of small programs. You can see the code in one tab and see the program in action in another tab. Here's a couple screenshots:
http://crookedgames.com/wx_python_demo_action.png
http://crookedgames.com/wx_python_demo_code.png
Yet another cool thing about it is Robin Dunn, its maintainer. He seems to go through the mailing list every day or two, and answers most questions that people have. He's been maintaining the project for a long time and knows what's up. Maybe I shouldn't be advertising him as tech support, but I've received helpful assistance from him more than once :)
Just a note in case someone finds this via Google or whatever.
For creating your form layout without code, there is the included XRC editor, which allows you to create dialogs, panels, menus, toolbars, etc. and save those as XML files, which can be loaded and displayed by your application code.
http://wiki.wxpython.org/XRCTutorial
Regardless of how you create you GUI in wxPython, make sure you have a basic understanding of how sizers work to layout your application.
We used pyqt3 for which you could buy a pyqt-only commercial license (I think $300, cheaper than the maybe $1500 full QT license). I'm not sure what the situation with pyqt4 is. The price is per developer. I don't know the current pricing because that's apparnetly impossible to find on the QT site.
If I had to pay the full price today, I would still do it (speaking as a commercial developer that is) -- it's really a high quality toolkit.
I think dabo is higher level than pyqt is though Qt also has various ways to integrate database data sources into your views. I don't know how important that is to you.
http://www.riverbankcomputing.com/commercial/buy
I've used pyQT for QT and KDE applications and I enjoy it very much. It's nice to be able to use QT Designer to quickly build windows and application panels and then use pyuic to generate the python code.
pythoncard is like hypercard but it has all the power of python behind it. I have used it to write little desktop apps and been quite happy with the ease of development (particularly when adding new features after some months) and the performance. I never tried making an exe, but it should be possible.
Right now I'm experimenting with on an alternative to wxPython called wxpy using a forked version of the SIP bindings generator, instead of SWIG, to see if I can eek out more performance and bring down the memory usage:
http://github.com/kevinw/wxpy/wikis