What GUI toolkit looks the best?

P

Paul Rubin

I've been approached about writing a Windows app which will need a
really professional looking GUI. Forget TKinter, this has to actually
look good (real artists will be available to get the visual stuff
right). Assuming I write in Python, what's the best toolkit to use?
Some cost in implementation pain is tolerable if the finished
interface looks better as a result. It would be nice if the toolkit
runs on multiple platforms rather than being Windows-only.

I'm thinking Glade. Is that reasonable? I don't know squat about
Windows and haven't done much fancy GUI programming since the early X
days.

Thanks.
 
B

Brian Kelley

Paul said:
I've been approached about writing a Windows app which will need a
really professional looking GUI. Forget TKinter, this has to actually
look good (real artists will be available to get the visual stuff
right). Assuming I write in Python, what's the best toolkit to use?
Some cost in implementation pain is tolerable if the finished
interface looks better as a result. It would be nice if the toolkit
runs on multiple platforms rather than being Windows-only.

Why forget Tkinter? I've seen Tkinter applications that look incredibly
fabulous. A lot depends on what you are trying to do. If you are
making a graphics-heavy application then Tkinter's canvas is pretty
sweet. I also think IDLE looks pretty good.
I'm thinking Glade. Is that reasonable? I don't know squat about
Windows and haven't done much fancy GUI programming since the early X
days.

Glade isn't a GUI, it is a GUI builder that uses GTK. In my experience,
GTK doesn't look quite right on windows boxes, especially the menus. Of
course I have the same basic view of Qt and Swing so know you know my
biases.

I tend to use Tkinter for canvas heavy applications and wxPython for
other stuff.

As for application building, here are my rankings
1 Emacs :)
2 Glade with libglade and Mitch Chapman's python libglade wrapper
3 BlackAdder with Qt
4 Boa-constructor (largish learning curve here I think)
5 wxGlade (layout isn't quite right)

So let me ask what kind of application are you building?

The bottom line is that I have seen great looking and really poor
looking apps in all of these gui's.

Here is my humble opinions in a nutshell (missing a lot here): wxPython
has a grid control to die for and many, many classes, good printer
support and looks like a native GTK app on Linux and a native app on
windows and macintosh. Qt is better for developing - it has a better
class structure and I tend not to have to look up docs as often and can
look really, really nice. Tkinter has a killer canvas and great
postscript output. GTK is really quite fast.

but don't take my word for this, why don't you see what you like the best?

http://www.wxpython.org/
http://www.gtk.org/
http://www.scriptics.com/
http://www.trolltech.com/

Speaking of Qt, does anyone want to make a python binding to jakasha?
http://www.jahshaka.com/

Brian
 
P

P

Brian said:
Why forget Tkinter? I've seen Tkinter applications that look incredibly
fabulous. A lot depends on what you are trying to do. If you are
making a graphics-heavy application then Tkinter's canvas is pretty
sweet. I also think IDLE looks pretty good.



Glade isn't a GUI, it is a GUI builder that uses GTK. In my experience,
GTK doesn't look quite right on windows boxes, especially the menus. Of
course I have the same basic view of Qt and Swing so know you know my
biases.

I tend to use Tkinter for canvas heavy applications and wxPython for
other stuff.

As for application building, here are my rankings
1 Emacs :)
2 Glade with libglade and Mitch Chapman's python libglade wrapper

Freaky. I've been using something VERY similar for the last 2 years.
An example of my libglade.py usage is at:
http://www.pixelbeat.org/talks/pygtk/mail/
Great minds think alike I suppose :)

Pádraig.
 
P

Paul Rubin

Paul, I certainly can understand your dismissal of Tkinter
as it's commonly employed. Are you aware, though, of <URL:
http://tcl.projectforum.com/tk/Home > and <URL:
http://mini.net/tcl/10424 >? Tkinter might, in fact, best
meet your requirements.

No I'm not. I wrote one tkinter application just to try it out and
while it was nice for putting up a quick and dirty gui, it looked very
crude and the API was also quite inflexible. I clicked the first of
those two url's and it seems to be an in-progress discussion about how
to rework tcl to fix its limitations, but I don't want to rely on
something that's not yet already working. Thanks though.
 
C

Cameron Laird

No I'm not. I wrote one tkinter application just to try it out and
while it was nice for putting up a quick and dirty gui, it looked very
crude and the API was also quite inflexible. I clicked the first of
those two url's and it seems to be an in-progress discussion about how
to rework tcl to fix its limitations, but I don't want to rely on
something that's not yet already working. Thanks though.

I persist at this out of concern that I'm not making things clear.
My stake, incidentally, is that you be successful, not that you
use any particular toolkit.

The second URL gives working code that you can use immediately in
your own applications to improve their appearance. This is not an
extension or anything at all difficult or constraining; it's just
a little prologue that refines the standard Tkinter appearance.
It *is* in use, right now, in several applications that must have
professional appearances. The first URL is about committee work,
essentially, that will fold the enhancements of the second URL
back into the standard Tk distribution.
 
P

Paul Rubin

Brian Kelley said:
Why forget Tkinter? I've seen Tkinter applications that look
incredibly fabulous.

Got any url's for screen shots?
A lot depends on what you are trying to do. If
you are making a graphics-heavy application then Tkinter's canvas is
pretty sweet. I also think IDLE looks pretty good.

There will be some graphical icons and stuff like that which people
will click on, but no really heavy graphics or drawing tools in the
sense of a photo editor or anything like that.
Glade isn't a GUI, it is a GUI builder that uses GTK. In my
experience, GTK doesn't look quite right on windows boxes, especially
the menus. Of course I have the same basic view of Qt and Swing so
know you know my biases.

Oh ok, I understand a bit better now.
I tend to use Tkinter for canvas heavy applications and wxPython for
other stuff.

Is wxPython Windows specific? I guess it is, but can I port the
screen layouts to some comparable Linux toolkit or anything like that?
The screen shots for it do look really nice.
Here is my humble opinions in a nutshell (missing a lot here):
wxPython has a grid control to die for and many, many classes, good
printer support and looks like a native GTK app on Linux and a native
app on windows and macintosh.

Oh wow, yes I guess it's cross platform then. Hmm, what Micro$oft
tool do I need to build and run it? Is Visual C++ enough? I guess
I can get the client to pay for some stuff like that. Also, is there
a Glade-like drag and drop gui editor for it?
Qt is better for developing - it has a better class structure and I
tend not to have to look up docs as often and can look really,
really nice.

The KDE apps that I've seen look good but not really top notch. Maybe
more attention could improve them. They're certainly good enough for
practical use.
Tkinter has a killer canvas and great postscript output. GTK is
really quite fast.

I think I don't care about heavy duty graphics or more than rudimentary
printing.
but don't take my word for this, why don't you see what you like the best?

http://www.wxpython.org/
http://www.gtk.org/
http://www.scriptics.com/
http://www.trolltech.com/

I don't know what I can really tell from these without more experience
with them. In particular, which is the most solid and reliable across
a wide range of Windows versions (95, 98, ..., XP whatever)? That
matters too.

Thanks!

Paul
 
P

Paul Rubin

I persist at this out of concern that I'm not making things clear.
My stake, incidentally, is that you be successful, not that you
use any particular toolkit.

The second URL gives working code that you can use immediately in
your own applications to improve their appearance. This is not an
extension or anything at all difficult or constraining; it's just
a little prologue that refines the standard Tkinter appearance.
It *is* in use, right now, in several applications that must have
professional appearances. The first URL is about committee work,
essentially, that will fold the enhancements of the second URL
back into the standard Tk distribution.

Oh cool. The second screen shot on that page ("after") does look a
lot better than the "before" shot. I guess I'll look at it more
carefully, but Tkinter has always made me cringe because of its use of
tcl (why does it need its own extension language if Python itself is
supposed to be such a good one)? Thanks.
 
B

Brian Kelley

Paul said:
Oh wow, yes I guess it's cross platform then. Hmm, what Micro$oft
tool do I need to build and run it? Is Visual C++ enough? I guess
I can get the client to pay for some stuff like that. Also, is there
a Glade-like drag and drop gui editor for it?

None. Just download the wxpython binaries and away you go. If you want
to build from scratch Visual C++ is enough. wxGlade is a good designer
although it does have some warts. wxDesigner is good as well, although
not free.


http://www.wxpython.org/

wxGlade
http://wxglade.sourceforge.net/

wxDesigner
http://www.roebling.de/

And join the wxpython mailing list. You'll be glad that you did.
Brian
 
E

Edward K. Ream

I have a lot of experience with both wxPython and Tkinter. I would urge
caution regarding any quick judgments. All cross-platform toolkits have
significant bugs and design flaws.

My experience is that Tkinter is the "least bad" and more flexible.
wxPython (of course) inherits all the _many_ bugs in wxWindows. It's not
clear that wxWindows really actually works. Whenever I use
wxPython/wxWindows I find more bugs in a week than I have found in 3+ years
with Tk/Tkinter. YMMV. The (admittedly very cool) wxPython demo regularly
segfaults on Windows. Sheesh.

The main point is that some real experimentation (and risk!) is going to be
required for any significant project. You may as well budget some time for
frustration: it _is_ going to be there.

Just one example of what you might expect. My app uses a Text widget in
many non-trivial ways. Both Tkinter/Tk and wxPython/wxWindows have
seemingly minor, but actually _major_ problems with Text widgets.

Tk "helpfully" adds a newline at the end of text widgets in various
situations, which leads to no end of complications in my app. I wish Tk
would just _buzz off_ and not mess with my data. But noooooo.

The wxWindows Text widget, OTOH, uses an absolutely brain-dead api that
exposes platform-specific line endings. The complications become truly
horrendous for serious work: there is no proper model behind Text offsets.

Actually, both Tkinter and wxPython totally suck regarding offsets into text
widgets. One would like integer offset in the text widget to be _identical
in all respects_ with the integer offset into the Python strings that one
passes to and receives from these widgets. But nooooooo... I call this the
"cursed offset problem", which is really a special case of the "cursed
newline problem" :)

In short, any cross-platform gui is going to cause you unexpected problems.
I'm not saying "don't use these tools". I am saying: "be prepared for nasty
surprises".

Edward

P.S. The idea that Tk is going to be "revitalized" any time soon is a
yawner, IMO. Wake me up when it happens.

EKR
 
C

Cameron Laird

.
.
.
lot better than the "before" shot. I guess I'll look at it more
carefully, but Tkinter has always made me cringe because of its use of
tcl (why does it need its own extension language if Python itself is
supposed to be such a good one)? Thanks.

Division of labor. Python is not petty or exclusive;
Python welcomes all things beneficial.
 
J

John Roth

Paul Rubin said:
Oh cool. The second screen shot on that page ("after") does look a
lot better than the "before" shot. I guess I'll look at it more
carefully, but Tkinter has always made me cringe because of its use of
tcl (why does it need its own extension language if Python itself is
supposed to be such a good one)? Thanks.

And that is what is called a "real good question." I believe that
you're supposed to be able to use the Tk libraries without using
TCL, but the people that wrote Tkinter weren't able to make it
work. I don't, however, know this for a fact, it's just something
that's bouncing around the old synapses...

John Roth
 
F

Fredrik Lundh

Edward said:
Tk "helpfully" adds a newline at the end of text widgets in various
situations, which leads to no end of complications in my app. I wish Tk
would just _buzz off_ and not mess with my data. But noooooo.

that's why you should design your own leo widget:

http://effbot.org/zone/wck.htm

half-serious-ly yrs /F
 
F

Fredrik Lundh

John said:
And that is what is called a "real good question." I believe that
you're supposed to be able to use the Tk libraries without using
TCL, but the people that wrote Tkinter weren't able to make it
work.

Tk comes with lots of configuration code and widget bindings
implemented in Tcl.

Tk also uses many pieces of the Tcl C library.

both parts can surely be replaced; someone just has to do it
(or pay for it).

</F>
 
C

Cameron Laird

.
.
.
And that is what is called a "real good question." I believe that
you're supposed to be able to use the Tk libraries without using
TCL, but the people that wrote Tkinter weren't able to make it
work. I don't, however, know this for a fact, it's just something
that's bouncing around the old synapses...
.
.
.
It's a choice. Perlites tried both ways, and largely
settled on Perl/Tk, which uses the Tcl-free C bindings.
It's much, MUCH easier maintaining a Tcl-coded applica-
tion, though, so Tkinter pops out a couple of hours
after a new Tk release, while Perl/Tk takes months of
calendar time. Guido certainly has the ability to do a
low-level binding to Tk (and I know someone did, on an
experimental basis, in the mid-'90s--was that he?); he
chooses to invest his time elsewhere.

There's actually more to it than that. These are the
right highlights, though, to the best of my knowledge.
 
F

Fredrik Lundh

D

Dave Brueck

Edward said:
I have a lot of experience with both wxPython and Tkinter. I would urge
caution regarding any quick judgments. All cross-platform toolkits have
significant bugs and design flaws.

My experience is that Tkinter is the "least bad" and more flexible.
wxPython (of course) inherits all the _many_ bugs in wxWindows.
It's not clear that wxWindows really actually works.

Isn't that last sentence a bit overly FUD-ish? Whether or not wxWindows is
better or worse than Tkinter is beside the point - many successful applications
are built on top of wxWindows and wxPython, so it's quite clear that it does
actually work.

-Dave
 
C

Cameron Laird

.
.
.
I don't know what I can really tell from these without more experience
with them. In particular, which is the most solid and reliable across
a wide range of Windows versions (95, 98, ..., XP whatever)? That
matters too.
.
.
.
I want to say a few words about portability and comparisons.

I'm very reluctant to advise "see what you like the best" in regard to
GUI toolkits
<URL: http://www.informit.com/content/ind...ion_id={65C794A2-51C8-4FD3-8BD8-22F70A0695E0} >
the way I do for high-level languages. We all know it's entirely
realistic to counsel a newcomer, "Give yourself an hour, and you can
download and install Python (or Perl, or Ruby, or ...) and try it out
for yourself. You'll get a good first impression of how the language
operates."

It's not the same, though, for C# vs. Java, or the GUI toolkits. There's
a considerably greater start-up cost involved in exercising them meaning-
fully. You really are best off with advice from a live person whom you
trust.

You probably must "see what you like the best" ultimately, because your
requirements are unlikely to duplicate those of your potential mentors.
We can, however, help focus your search--and I'm posting because I think
we should.

<URL: http://www.scriptics.com/ > isn't the URL I recommend; Scriptics
stopped doing business under that name three and a half years ago. <URL:
http://wiki.tcl.tk/tk > is a safe choice.

You ask, "which is the most solid ...?" for Windows. I *am* a fan of
Tkinter, and the answer to this question explains much of that.
Tkinter's portability story is at least as good as that of any of the
alternative toolkits, and, I argue, better than all but Qt (depending
on your sentiments about licensing). You're likely to get quite a
range of testimony in this regard; I certainly know GTK+ experts who
seem quite productive under Windows. In my experience, though, Tkinter
just *thumps* all the others, in regard to the robustness of its
portability.

How's it happen you're not talking about Java (Jython, say)? In fact
I think it wouldn't be right for you; I'm surprised, though, not to hear
you mention it.
 
C

Carl

Paul said:
I've been approached about writing a Windows app which will need a
really professional looking GUI. Forget TKinter, this has to actually
look good (real artists will be available to get the visual stuff
right). Assuming I write in Python, what's the best toolkit to use?
Some cost in implementation pain is tolerable if the finished
interface looks better as a result. It would be nice if the toolkit
runs on multiple platforms rather than being Windows-only.

I'm thinking Glade. Is that reasonable? I don't know squat about
Windows and haven't done much fancy GUI programming since the early X
days.

Thanks.

What's wrong with Jython? I haven't used it myself, but have always wondered
why it's not mentioned when different Python GUI:s are discussed.

Carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top