PDA

View Full Version : Python GUI



zodiac123
May 10th, 2008, 11:56 AM
Hi, I'm a student programming in python - mainly console programs and one pygame project. In general my code tends to be ~500 lines.

I'm aware of widget toolkits like Tk which create GUI widgets, but I've tried Tk and don't like it - someone told me it's not particularly good. Does anyone know good alternatives, and what are your experiences in using them?

ssam
May 10th, 2008, 12:20 PM
PyGTK is pretty good. you can either create and arange widgits programtically or you can use glade to make the interface.

Kadrus
May 10th, 2008, 12:37 PM
there is also wxpython (http://www.wxpython.org/) which is very good...i suggest trying it out..check out this tutorial (http://zetcode.com/wxpython)

Can+~
May 10th, 2008, 05:28 PM
When working with GUI toolkits you will always have that problem, a truck load of declarations that are used once. Try using a separated file for interfaces. I use Python + Glade3 for that.

Also, try splitting your code in modules.

LaRoza
May 10th, 2008, 07:16 PM
The sticky has a link to GUI programming in Linux (my wiki also has a section for it)

dtmilano
May 11th, 2008, 10:17 PM
autoglade (http://autoglade.sourceforge.net/) may be to you, take a look at it.

MicahCarrick
May 13th, 2008, 12:20 AM
I am also a fan of PyGTK. I have a tutorial (GTK+ and Glade3 GUI Programming Tutorial - Part 1 (http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html)) which gives a thorough overview of using Glade 3 to build a GUI without discussing the language yet. Although I haven't yet finished part 3 which will discuss coding the GUI, the complete source of the final application (a text editor) is available in both C and Python.

The python Wiki has a large list of GUI toolkits you can use for Python: http://wiki.python.org/moin/GuiProgramming

xelapond
May 13th, 2008, 06:26 PM
I like PyQt, personally. If you are working with KDE Qt is definitely the way to go, though it also runs in Gnome.

stevescripts
May 13th, 2008, 08:47 PM
Hi, I'm a student programming in python - mainly console programs and one pygame project. In general my code tends to be ~500 lines.

I'm aware of widget toolkits like Tk which create GUI widgets, but I've tried Tk and don't like it ...


A serious question, absolutely not meant to be flame-bait. (and I invite responses from all concerned, not just the OP). If you don't want to respond in this forum, feel free to send e-mail.

What is it that you do not like about Tk? (in this case Tkinter...)

Is it an appearance issue for you, or a usage issue?

The tcl/tk community continues to strive to improve the appearance of the Tk widget set, particularly on Linux.

Steve

solarwind
May 14th, 2008, 04:58 AM
I have used PyQT and I like it. It's easy to use and works well with python. I'm sure PyGTK is just as good, but I don't know how to use Glade properly.

Senesence
May 15th, 2008, 08:14 PM
Another vote for wxPython.

It's cross-platform, features plenty of widgets, and is relatively easy to learn and use.

It's also very well documented, and there are even video tutorials for it:
http://showmedo.com/videos/series?name=PythonWxPythonBeginnersSeries

days_of_ruin
May 15th, 2008, 08:25 PM
pyGTK is good.