You are not logged in.
Pages: 1
I am having a hard time choosing which to go with for some Python projects. I like the simplicity of Tkinter, but wxPython looks more popular and cross platform.
Anyone have problems with Tkinter/wxPython and py2exe?
Which does everyone prefer?
Last edited by Google (2011-10-10 03:33:31)
Offline
wxPython. It, and PyQt were easy to port to that "operating system" from the US Pacific Northwest. Things based on Gtk were hopeless. Tk required far to many incantations.
They are all great on Linux and OS/X.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Tkinter is platform-independent, too. Being part of the Python standard library, it shouldn't have any problems with py2exe. It is however not sufficient for decent modern user interfaces, as it lacks too many advanced widgets, and doesn't integrate itself into the operating system.
I'd also advise against wxWidgets and its archaic API. Use Gtk or Qt. Both toolkits are fine for decent user interfaces, on Linux, Mac OS X and also on Windows. I myself prefer Qt for various reasons, but generally it doesn't matter which one you use.
Offline
Thanks,
I looked at GTK, but it seems there is the new GObject stuff and newer versions coming out-- I don't want to worry about all that fuss. It seems like there's a lot changing and a lot of fuss going on with GTK.
From what I have gathered:
Tkinter -> simplicity
wxPython -> native looks
GTK/Qt -> non-native looks, semi-complex, lots of power
How do you go about deciding between Qt or GTK? What's the major differences?
Offline
How do you go about deciding between Qt or GTK? What's the major differences?
The real question should be about PyQt. As opposed to Qt which can use the LGPL license, PyQt (when last I checked) is GPL.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Google wrote:How do you go about deciding between Qt or GTK? What's the major differences?
The real question should be about PyQt. As opposed to Qt which can use the LGPL license, PyQt (when last I checked) is GPL.
Offline
Gtk and Qt have "native looks" as well. I don't know about Gtk, but Qt is far better than wxWidgets at providing a native look and feel. It even uses the native dialogs from Gnome and KDE when run inside the corresponding desktop environment. wxWidget does not. Generally wxWidgets misses many things from Gtk and Qt, but in turn doesn't provide any special feature on its own. Any feature that you could possibly find in wxWidgets is likely also implemented in Gtk and Qt, and most likely in a far more decent way with a much more reasonable API too.
Concering the differences between Qt and Gtk, I'd advise you to implement a small project in both toolkits. Like a simple text editor. This gives you a feeling for the concepts of each toolkit beyond what other people are telling you, and allows you to chose the one whose concepts you like more.
@ewaller: PyQt is licensed under GPL, but with some exceptions which allow you to choose a bunch of other free software licenses, including LGPL, BSD and MIT/X11. You can perfectly write a LGPL library based on PyQt. For proprietary software a commercial license is provided.
And as giowck noted, there is PySide which is distribute under the terms of the LGPL, and by now almost as solid as PyQt. The only major feature it still lacks is Python 3 support, but that is being worked on.
Last edited by lunar (2011-10-09 18:24:58)
Offline
I'd not heard of that before. Cool. I see it is in the AUR -- clearly I have a learning project coming up.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks--
I am actually interested in Tkinter and GTK. I had thought about Qt but I don't know much about it. I suppose I could whip up a project in each and see how it goes.
Offline
Gtk and Qt have "native looks" as well. I don't know about Gtk, but Qt is far better than wxWidgets at providing a native look and feel.
wxWidgets looks 100% native on any platform since it actually uses the native toolkit for the OS. (GTK+ on Linux, Cocoa on Mac...)
I'd also advise against wxWidgets and its archaic API.
In what ways do you feel the wxWidgets API is archaic?
I wrote my first GUI application recently using Python, wxPython, and wxGlade. It was a very pleasant experience. It ran well and looked perfect on multiple operating systems without me having to do anything special.
I feel that the main drawback of wxPython is if you want to do anything particularly special in the GUI (you know, stuff besides buttons, text boxes...) a different API might be better. You certainly CAN create special widgets for wxPython, but, I don't know, it just seemed like it was harder to do than it should have been. I don't have any experience programming with the Qt or GTK APIs, so I don't know if they're better in that regard.
Offline
@drcouzelis: Gtk+ isn't the "native" GUI toolkit of Linux. Linux doesn't have a "native" toolkit, and thus wxWidgets doesn't look native at all when run in a Qt environment like KDE. Qt however adapts it's look and feel to Gtk, when run in Gnome, taking over the Gtk theme, changing the button order in dialogs, and using the Gtk file dialogs.
The heavy usage of numeric IDs to identify widgets inside events ("wx.ID_ANY" anyone?") is archaic, for instance. Or the representation of events as global constants, instead of using type-specific signals (like Gtk and Qt). Or the string-based ListCtrl and TreeCtrl widgets, which don't separate data from representation like Qt and Gtk do.
Aside of this wxWidget lacks many advanced stuff like a multimedia API, a decent concurrency API (not just wxThread), a decent painting API (like Qt with QGraphicsView), SVG support, Javascript and HTML support, and so on.
Offline
Pages: 1