Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Among the GUI libraries for Python, which is more easier to work with: PyQt4, wxPython or any other? I just wrote few lines of PyQt4 code, it seems things are not that easy with Qt.

Are there any performance pros and cons also among these GUI libraries?

share|improve this question

closed as not constructive by Thomas Owens Oct 5 '12 at 12:42

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

Depends on what you are trying to do, can you be more specific. –  Woot4Moo Jan 11 '11 at 21:11
I don't know how to respond. I will be writing all sorts of GUI apps. from time to time. At present writing a small utility that should work from the Windows context menu. –  RPK Jan 11 '11 at 21:29
What platform are you targeting? One heavy strike against wxWidgets is that it won't be 64-bit native on OS X until some indeterminate time in the future when 2.10 drops. –  Sharpie Jan 11 '11 at 23:02
Maybe ask for pros and cons of each GUI library just to avoid subjective answers as much as possible –  br3w5 Oct 5 '12 at 12:05

3 Answers 3

up vote 5 down vote accepted

You can try PyGTK; it's cross-platform, well documented and many apps have been written with it for you to refer and learn.

Although I've to mention that wxWidgets (wxPython is its python binding) is a native mode toolkit; it's a thin abstraction layer over the platform's native tools i.e. say a textbox control in wxWidgets will not be written from scratch unlike GTK+, Qt, etc. but it'll actually expose the original platform's text box in a consistent manner across all platforms like Windows, Linux, Mac, etc. In that way it's different than the others and better in some areas.

Edit: Came to know about Kivy which definitely deserves a mention here, since it has more to offer than the aforementioned toolkits; it can run not only on desktop platforms, but also on portable devices i.e. it runs on Windows, Linux, Mac AND iOS (iPad, iPod, iPhone), Android. It's also GPU accelerated (uses Open GL ES2).

Refer GUI Programming in Python for a comprehensive list of toolkits available.

I'd suggest you try out a small prototype kinda app in both and see for yourself; since these are only suggestions, it's always what the programmer finds best at home in the end.

share|improve this answer

Easiest I would say has to be Tkinter. It's part of a normal python install and tk is dead simple to understand.

As for performance, they are going to be roughly equal. GUIs don't need to be particularly fast since you're operating on time scales that are visible to the naked eye. Meaning, if you write code for your GUI that takes 40ms, the user probably won't perceive that as slow even though from a computers perspective 100ms is an eternity.

I haven't used PyQT, but I've used Tkinter and wxPython and I think Tkinter is much easier to understand and use. Some people think wxPython looks nicer, though with python 2.7+ tkinter has themed widgets which closes the gap. wxPython has more widgets built in, but for simple GUIs you don't need all those extra widgets.

The main downside I see with tkinter is the lack of decent printing support. Though, you have to ask yourself how often anybody will be printing anything form your app.

share|improve this answer

Haven't tried wxPython; but on PyQt, i find that it's easy and straightforward only if you think in terms of the original C++ API. I do like Qt a lot in C++, but on Python i find it very non-pythonic, so i usually stay with C++ except for some sections that are not too close to the library. (and then i tend to do them in Lua, not Python)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.