views:

207

answers:

5

I need to create a simple windows based GUI for a desktop application that will be downloaded by end users. The application is written in python and will be packaged as an installer or executable.

The functionality I need is simple - selecting from various lists, showing progress bars, etc. No animations, sprites, or other taxing/exotic things.

Seems there are quite a few options for Python GUI libraries (Tk, QT, wxPython, Gtk, etc). What do you recommend that:

  • Is easy to learn and maintain
  • Can be cleanly packaged using py2exe or something similar
  • Looks nice

[Update] For what it's worth I ended up going with tkinter. It's fairly well documented, can be made to look nice (mainly, use native fonts), and most importantly ships with Python so there's nothing extra to worry about. wxpython also looked good, but the download was 10M or so, and I didn't want to add that extra weight to the packages I distribute.

+1  A: 

I've used wxPython in the past (For Mac/Windows deployments). It has worked good. And it looks nicer than Tk :)

Justin
+1  A: 

From using both wxPython and TKinter, I'd say wxPython looks nicer and is easy to learn.

Although you said you are planning on using the program for Windows, it's worth mentioning that I've had problems with TKinter on Mac not working correctly.

jakecar
Personally, I disagree with the ease of learning. Tkinter and wxPython definitely have different philosophies though, and each will be easier to pick up for some, harder for others.
Bryan Oakley
+1  A: 

tkinter's major advantage (IMHO!) is that it comes with Python (at least on Windows). It looks ugly, and there's no progress bar or something like that (at least not builtin). Being a thin wrapper around Tk, its API doesn't feel very elegant or intuitive. However, there are quite a few good Tkinter resources on the web so learning it is not necessarily a pain.

For any serious GUI attempts, I'd go for wxPython as well. I don't know about packaging, though. But I wouldn't expect any problems.

Alexander Gessler
ugly is largely the fault of the designer and coder and, of course, in the eye of the beholder. Tk itself isn't intrinsically ugly, it's just that some defaults are a bit outdated. Professional developers can make Tk applications that are virtually indistinguishable from other toolkits.
Bryan Oakley
Bryan, if you have any pointers to making Tkinter look attractive/native I'd appreciate them.
Parand
@Parand: The easiest answer I can give is to use themed widgets, which became available with Tk 8.5. Check out http://code.google.com/p/pyttk/. Note that this isn't exactly a cutting edge feature -- themed widgets have been available for Tcl/Tk for many years, but unfortunately Tkinter lags behind the state of the art.
Bryan Oakley
+2  A: 

I've recommended wxPython in the past and it's still an excellent tool. The others always seemed somewhat cumbersome to me.

There's instructions out there on the web which show exactly how to package a wxPython GUI.

The wxAui section in particular can give some really clean / usable results:

Jon Cage
+2  A: 

The most beautiful one that I can suggest is PyQt (almost native), otherwise a good idea would be using directly IronPython that is native .net code.

Anyway nothing beats tkinter for multi-platformness and packaging-friendliness.

pygabriel