tags:

views:

397

answers:

7
+1  Q: 

GUI in python

Duplicate:

Cross-platform gui toolkit for deploying Python applications

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

A: 

I'd recommend you wxPython.

Darth
+5  A: 

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

Shay Erlichmen
A: 

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
+5  A: 

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.

Georg
+2  A: 

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.

sysrqb
+1 as I personally also like PyQt more then wxPython
ChristopheD
+2  A: 

+1 for PyQt

Xolve
A: 

TKInter. easiest.

Yossarian
And ugliest! :-)
rq
You might want to read http://stackoverflow.com/questions/349409/why-are-tk-guis-considered-ugly for another opinion on that
Bryan Oakley
Ugliest of course :-) but it was the first GUI i used in python, while i was learning it.
Yossarian