Simple Python GUI?
April 2, 2010 9:48 AM   Subscribe

What is the easiest to use Python GUI?

I want to make some executable files in Python, and share them with others. They don't require much user functionality, but I want to be able to have the user check-boxes, add a file-path and a few other basic things.

What would be recommended?
I took a look at this previous question but did not see anything obvious (aside from a list of all possible GUI tools).

Thank you.
posted by a womble is an active kind of sloth to Computers & Internet (6 answers total) 4 users marked this as a favorite
 
Best answer: Guido, the Benevolent Leader for Life of Python, likes wxPython. There's a book, wxPython in Action, which is about four years old. Buy it. The order of what is introduced when in the book is a little off. Come of the material is dated. You will need to become semi-proficient at reading the underlying wxWidgets C++ documentation online. You may want to install Code::Blocks and use the wxSmith plug-in to figure out more how sizers, the primary layout tool for your elements (widgets), work. Remember figuring out tables and CSS worked for layout in HTML back in the day? Yeah, that will be another conceptual hurdle.

It is the only Python GUI I have touched, so I have no basis for comparison. I have been compiling with py2exe. That requires some massaging, as well.
posted by adipocere at 9:55 AM on April 2, 2010


Response by poster: I'll take a look - I also use py2exe. I should have added, my programming knowledge is at the lower side of intermediate. These aren't super-complicated programs (a few hundred lines of code at most).
posted by a womble is an active kind of sloth at 9:59 AM on April 2, 2010


I took a brief look at the options and also decided on wxPython although the docs aren't great. There's a fair number of samples out there though and the layout manager is enough like BorderLayout in Java that it makes sense. I also used it with py2exe and that worked pretty well.
posted by GuyZero at 10:04 AM on April 2, 2010


Wx is common and available in a lot of languages. It shouldn't be too hard to find a tutorial or two that gets you most of the way through your project.
posted by rhizome at 10:29 AM on April 2, 2010


I've found PyGTK to be more pleasant to use than wx or QT. wx is pretty good, though. PyQT's docs required reading C++ docs last time I checked, but that was a couple of years ago.


<pedant>py2exe is not a compiler. But you knew that.</pedant>
posted by qxntpqbbbqxl at 11:27 AM on April 2, 2010


IMHO, you happened to have hit on two of the wartiest areas in the whole Python ecosystem: GUI toolkits, and Binary Installers. py2exe is probably your best bet on the second front. Did you look over at StackOverflow for answers on the first one? It'll be informative!

(Also, if you really want "simple, and I don't care how it looks!" consider just using the included tcl/tk, and py2exe it)
posted by gregglind at 4:27 PM on May 29, 2010


« Older D+ Cup Swimwear in NYC   |   You don't win friends with salad. Newer »
This thread is closed to new comments.