18

We are planning to develop an application for monitoring and configuring our service (which is running on remote server). After long time of discussion, we decided for python as platform for our app, because we love and know python. But we don't know, what GUI toolkit preferred for our aims. We need fast (for development and running) app, whose users will be Admins, Maintainers and Account managers.

There are two GUI toolkit for python, which we know: wxPython and pyQT. Anybody have arguments regarding pro and cons? And maybe someone knows any commercial applications, using these products (only python version of toolkits)? Links are desirable.

Thanks.

ρss
  • 5,115
  • 8
  • 43
  • 73
Golovko
  • 609
  • 4
  • 8
  • 8

8 Answers8

12

I choose wxPython after much research. The reasons were:

  • "wxPython in Action" book by Rappin & Dunn
  • The voluminous examples that come as part of the wxPython download
  • The number of projects that have used wxWidgets
  • The fact that wxPython code runs equally well on Linux, Mac OS/X and Win32

I did consider pyQT and other researchers are successfully using it. After writing many examples in all API's that I considered, I found wxPython ticked the most boxes for me.

As for Tkinter (TIX), I think it looks rather dated. Unless you are using IronPython or Jython I would not consider using the associated native windowing APIs. For another project which is to be delivered exclusively on .Net, I plan to use WinForms after lots of great feedback from StackOverflow members.

CyberFonic
  • 3,957
  • 1
  • 21
  • 21
  • +1 : I favour PyQt, but the example code that comes with wxPython is good. It's nice to be able to copy and paste from the demo app. – Nick Dec 23 '09 at 11:54
  • 2
    The statement "...wxPython code runs equally well on Linux, Mac OS/X and Win32" is a bit of an overstatement. I regularly find differences between the three platforms. Some widgets imply aren't implemented on some platforms. Some widgets throw errors or have different behaviors on different platforms. It's not pervasive, but there are real between the platforms. – Bryan Oakley Mar 14 '10 at 16:52
9

Well, I am a fan of QT: it has a more modern look and feel. However - your choice should be based on your actual requirements. Simple trade studies are helpful for this. Make a list of what features your toolkit must have and what features would be nice to have and then weight each item appropriately. Then look at all your options (TKinter also) and then score them according to your feature list (using the weights you assigned to each feature requirement). At the end it should be evident which one is right for your project.

Shane C. Mason
  • 7,518
  • 3
  • 26
  • 33
6

I've always liked Qt's "signals and slots" conceptual model, though I guess it may take a bit of learning for developers who are more used to other models of event propagation and handling. Personally, given a choice, I'd pick PyQt because of this programming aspect.

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
5

You wrote "There is two GUI toolkit for python, which we know: wxPython and pyQT." You are forgetting about the most obvious toolkit: tkinter. That's actually part of a core python distribution, no extra downloads required.

Some people don't like Tk but that's often due to ignorance. Tk is a fine choice for a cross platform toolkit. It uses native widgets on windows (and has for many years) and the latest versions of tk use themed widgets on all platforms.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • Tkinter v8.5 looks much better than earlier versions. If your GUI only requires basic widgets or is mainly Canvas based, then Tkinter is convenient option. I have found http://www.tkdocs.com/ to be an excellent resource. – CyberFonic Jan 13 '10 at 01:35
  • While I agree, I'd also say if your program is largely text based, there's nothing that can compare to Tk's text widget. It's only disadvantage is the lack of a good printing option. Still, it beats any widget in the wxPython toolkit by miles. – Bryan Oakley Jan 13 '10 at 03:07
4

i've been using wxpython for 3 years .. and now we had to switch into pyqt since qt is integrated in maya 2011 .. however , wxpython is more straight forward and you can easily start working on it and learn it from zero fast .it provides and awesome resources and decumentation . but QT provides more powerful features that you cant find in wxpython , for example ( the multi touch detection) , QT also provides good support for drawing devices like pc tablets and so on .

qt also provides a good designer that makes u create interfaces faster.
one of qt disadvantages is it's license since it's not free like wxpython

Moayyad Yaghi
  • 3,622
  • 13
  • 51
  • 67
  • 1
    Suggest you revise... QT itself is LGPL. PyQT is GPL, but PySide is LGPL. So the licenses *are* free, but if you use PyQT and you don't want all your code subject to GPL, you need to purchase a commercial license, whereas PySide doesn't have that restrictions. – Jason S Jul 25 '13 at 18:36
3

I want to point out two strengths that wxPython has compared to pyQt:

  1. It uses native widgets on every supported platform. So the apps have a native look and feel. I'm aware that PyQt uses native styles, but the behavior ("the feel") is reported to be somewhat non-native especially on the Mac.
  2. It provides a wider choice of widgets out of the box.
user127712
  • 69
  • 1
  • 3
    On point 2: this is a curse as much as a blessing. PyQt has less widgets, but they are more powerful because they are more flexible (e.g. tree view). I've given up on wxPython because the docs are patchy and I've found too many bugs in the past. I wish wxPython would focus on making a smaller subset of widgets more robust and better documented, rather than the kitchen sink approach they seem to have. – Nick Dec 23 '09 at 11:51
3

A Windows (and Mono) option for a GUI toolkit is provided by IronPython. It provides access to the Winforms and WPF libraries. For examples, see Developing with IronPython & Windows Forms, and many others.

If you want to expand the list of options, consider building a Web App instead of a (local) GUI app. You say your service runs on a remote server, so networking is part of your requirements. Once you start down that road, Python provides a bewildering amount of options.

gimel
  • 83,368
  • 10
  • 76
  • 104
2

You should also check out PyGTK. It is similar to pyQT in programming model but does not have any licensing cost since it is LGPL. I always found it nice to work with as a developer. The main drawback over pyQT is that in some cases they take away functionality in things like file chooser dialogs in favour of simplicity for the user.

lambacck
  • 9,768
  • 3
  • 34
  • 46