4

Duplicate:

Cross-platform gui toolkit for deploying Python applications

I want to create a GUI application in python. Which library is best one?

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Jijoy
  • 12,386
  • 14
  • 41
  • 48
  • @Click Upvote: see http://stackoverflow.com/questions/14593 – Can Berk Güder Mar 28 '09 at 12:57
  • Where does it say to remove salutation from a question? – Ali Mar 28 '09 at 13:01
  • Your link clearly indicates that you're in the wrong here, Can. – SilentGhost Mar 28 '09 at 13:03
  • Obviously it's open to interpretation, but I remove all the Hi's and Thanks' when I see a signature. – Can Berk Güder Mar 28 '09 at 13:04
  • the only authoritative say there is from Jeff, who says "If I am already editing a post for one of these reasons, I will generally go ahead and take out any greeting/salutation at the beginning. [...] I rarely remove a “Thanks” at the end unless it’s long and apologetic" your eidt was specifically – SilentGhost Mar 28 '09 at 13:12
  • to remove those parts. I've no problem with you doing it, as long as you're not claiming that some common conscious of SO supports you. – SilentGhost Mar 28 '09 at 13:13
  • @Silent Ghost: I'm not saying everyone agrees on this, and I don't *usually* edit posts only to remove salutations or signatures. On this question, however, the salutation and signature were 2 lines, where the question itself was only 1 line. That's fair game to me. – Can Berk Güder Mar 28 '09 at 13:18

6 Answers6

7

From the question Cross-platform gui toolkit for deploying Python applications:

PyQt

It's build on top of Qt, a C++ framework. It's quite advanced and has some good tools like the Qt Designer to design your applications. You should be aware though, that it doesn't feel like Python 100%, but close to it.

This framework is really good. It's being actively developed by Trolltech, who is owned by Nokia. The bindings for Python are developed by Riverbank.

Nokia announced that they'd start to use LGPL for the Qt-Framework starting with Qt 4.5 (to be released in April, I think), but it's not yet sure if Riverbank follows this and releases the bindings for Python under LGPL too. (They have a commercial and a GPL licence at the moment.)

Qt is not only a GUI-framework but has a lot of other classes too, one can create an application by just using Qt classes. (Like SQL, networking…)

Qt doesn't use native GUI elements, but wikipedia mentions that in recent versions Qt uses native widgets where possible. I haven't found evidence in the documentation but for Mac OS X.

wxPython

wxPython is a binding for Python using the wxWidgets-Framework. This framework is under the LGPL licence and is developed by the open source community.

What I'm really missing is a good tool to design the interface, they have about 3 but none of them is usable.

One thing I should mention is that I found a bug in the tab-view despite the fact that I didn't use anything advanced. (Only on Mac OS X) I think wxWidgets isn't as polished as Qt.

wxPython is really only about the GUI-classes, there isn't much else.

wxWidgets uses native GUI elements.

Others

I haven't got any experience with other GUI frameworks, maybe someone else has.

Community
  • 1
  • 1
Georg Schölly
  • 124,188
  • 49
  • 220
  • 267
5

wxWidgets (the Python flavor is called wxPython) is currently your best option IMHO, they have support for multi platform (Mac, Window, Linux) and the framework is pretty easy to work with.

From the site:

wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more using one codebase. It can be used from languages such as C++, Python, Perl, and C#/.NET. Unlike other cross-platform toolkits, wxWidgets applications look and feel native. This is because wxWidgets uses the platform's own native controls rather than emulating them. It's also extensive, free, open-source, and mature. Why not give it a try, like

MiniQuark
  • 46,633
  • 36
  • 147
  • 183
Shay Erlichmen
  • 31,691
  • 7
  • 68
  • 87
3

I like PyQt. wxPython has many warts, and the code you write in PyQt is often much cleaner. The UI designer is very helpful as well.

rmmh
  • 6,997
  • 26
  • 37
1

For general-purpose GUI applications, I would recommend wxPython. It's the python flavor of the wxWidgets project. It's easy to work with, cross-platform, full-featured and the demo is actually a great tutorial.

For game-like GUIs, I would go with pyGame. It's also very simple and powerful: you can program a little game in minutes.

MiniQuark
  • 46,633
  • 36
  • 147
  • 183
0

I'd recommend you wxPython.

Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
-1

TKInter. easiest.

nothrow
  • 15,882
  • 9
  • 57
  • 104
  • You might want to read http://stackoverflow.com/questions/349409/why-are-tk-guis-considered-ugly for another opinion on that – Bryan Oakley Mar 28 '09 at 12:08
  • Ugliest of course :-) but it was the first GUI i used in python, while i was learning it. – nothrow Mar 28 '09 at 16:45