python GUIs comparison (want)

F

Fredrik Lundh

Christophe said:
huh? create object, display object, create object, display object. sure
looks like plain old Python to me...

Let's see :

.pack(side = "left")

fred = Button(self, fg = "red", bg = "blue")
fred["fg"] = "red"

fred.bind("<Enter>", turnRed)

Yep, unelegant API I mantain

yuck. if that's the kind of UI programs you're writing, we sure have
different design ideals.

and arguing that Tkinter is unelegant when you're doing silly things in
a silly way is a bit like arguing that Python is unelegant because your
first attempt to write a "hello world" program resulted in:

import sys
# .stdout.write("Hello World") # gives unusable error message
from sys import stdout as glah
glah.writelines(iter(" ".join(["h3110", "W0rlD"])))
And no modern layout manager available. Only those old school
left/right/up/down pack and anchors are available.

huh? when did you last look at Tk? 1994?

</F>
 
C

Christophe

Fredrik Lundh a écrit :
Christophe said:
Also, the Tkinter API is far less elegant than the others.
huh? create object, display object, create object, display object.
sure looks like plain old Python to me...

Let's see :

.pack(side = "left") ----
fred = Button(self, fg = "red", bg = "blue")
fred["fg"] = "red" ----
fred.bind("<Enter>", turnRed) ----
Yep, unelegant API I mantain

yuck. if that's the kind of UI programs you're writing, we sure have
different design ideals.
Those are all small code examples you find in the Python manual! They
are not a working program in itself and should not be taken so. I just
state my point about an ugly API with them.
and arguing that Tkinter is unelegant when you're doing silly things in
a silly way is a bit like arguing that Python is unelegant because your
first attempt to write a "hello world" program resulted in:

import sys
# .stdout.write("Hello World") # gives unusable error message
from sys import stdout as glah
glah.writelines(iter(" ".join(["h3110", "W0rlD"])))
And no modern layout manager available. Only those old school
left/right/up/down pack and anchors are available.

huh? when did you last look at Tk? 1994?
Yesterday. In fact, I could find no mention at all of layout managers
others than those working with anchors. Anchors are soooo old school
nowadays :)

Honestly, I can't stand using anchors or the Packer anymore. The systems
used in wx, Qt are much better. Use them once and you cannot live
without them anymore.
 
D

David Boddie

Fredrik said:
Christophe wrote:

then it sounds like a combination between "it's a silver bullet!" and
"commercial software is better than free software!".

Well, nobody's stopping you from paying the commercial license fee (to
get access to support services) and releasing software under the GPL.
no matter how good Qt is, the reality is that if you spend that much
time on the UI implementation parts of your project, you're probably
developing at the wrong abstraction level -- no matter what toolkit
you're using. and if you're doing UI development the wrong way, chances
are that you're doing other things the wrong way too.

You're forgetting that Qt isn't just a widget toolkit.

David
 
R

rdsteph

Paul Boddie wrote:

"""The figures behind the scenes are quite enlightening for that
particular page. If you (or community experiences) don't agree with the

rankings (wxPython apparently even easier to learn than PythonCard and
Tinder, a bunch of Gtk-based toolkits having more or less "full" Linux
scores) then you'll have some surprises, I'm sure. Nevertheless, it's
an interesting concept. """

Well, I don't know what I was thinking, exactly, when I rated
PythonCard's ease of use...so I went back and changed it to rate it a
lot higher. The ratings in this script were done a long time ago now
and I need to re-do them, and add some new categories to rate also.
Maybe this weekend...

I have been thinking about doing a new version of this script that
allows visitors to the web site to enter their own ratings for each GUI
toolkit, for each criterion, store them by CGI and calculate a running
average of the ratings, maybe eliminating the very extreme high and low
scores to weed out spam, etc. Then, a visitor could use an online
script with each GUI toolkit rated by the "community" for each
criterion. I could do the same for Python IDE's, web frameworks, etc.

Still, these would still be toys and not to be taken too seriously, but
I might do it as a little project nonetheless.

Concerning GUI toolkits, I find myself coming back to Tkinter these
days. A lot of Python programs are written using Tkinter. I like to
fool around with a lot of the old stuff on the web for free,
miscellaneous apps and such, and there are still more Tkinter GUI's out
there than anything else.

Recently I have been having fun figuring out which new phone to buy. I
decided to get a smart phone that could run Python. If I lived in
Europe, or anywhere GSM rules, one of the Nokia series 60 would be a no
-brainer. But here in the USA, I will probably will wind up getting a
Windows based model.

Guess what: Folks have Tkinter up and running on Pocket PC's and
smartphones. I like that. Tkinter is everywhere. Don't forget, the
Komodo IDE has a Tk based GUI builder.

Just my 2 cents worth...

Ron Stephens

P.S. There is a 3 hour lecture by Dr. Sergio Rey of San Diego St. U. I
am putting up as a podcast. He teaches a course in Python in the
graduate department of Geographical Sciences. Python is heavily used in
that field of study (as is Tkinter).

The lecture is in 2 parts. Sound quality is excellent. <a
href="http://www.awaretek.com/python/index.html">Tkinter podcasts</a>
 
P

Paul Boddie

Well, I don't know what I was thinking, exactly, when I rated
PythonCard's ease of use...so I went back and changed it to rate it a
lot higher. The ratings in this script were done a long time ago now
and I need to re-do them, and add some new categories to rate also.
Maybe this weekend...

I know you're a big advocate of PythonCard, but if it weren't easier to
use than wxPython, then it would surely be hard to justify its
existence.
I have been thinking about doing a new version of this script that
allows visitors to the web site to enter their own ratings for each GUI
toolkit, for each criterion, store them by CGI and calculate a running
average of the ratings, maybe eliminating the very extreme high and low
scores to weed out spam, etc. Then, a visitor could use an online
script with each GUI toolkit rated by the "community" for each
criterion. I could do the same for Python IDE's, web frameworks, etc.

Still, these would still be toys and not to be taken too seriously, but
I might do it as a little project nonetheless.

A collaborative scoring application would be interesting and either
amusing or rather useful. It might have uses in other domains, too.
Concerning GUI toolkits, I find myself coming back to Tkinter these
days. A lot of Python programs are written using Tkinter. I like to
fool around with a lot of the old stuff on the web for free,
miscellaneous apps and such, and there are still more Tkinter GUI's out
there than anything else.

There's nothing particularly wrong about Tkinter as such, but if I were
doing serious user interface development these days, I'd have a hard
time justifying using Tkinter even though I was once a big fan of the
technology, Pmw and related stuff. Although people may assert that the
Tk scene is still vibrant, the intersection of Tk and Python doesn't
seem to have moved very far, despite Fredrik's efforts: what happened
to Tkinter 3000 or was that a codename for something else? And whilst
things like the Tk canvas were almost revolutionary back in the early
1990s, the momentum just doesn't seem to have been there to produce
similarly revolutionary things in the Tk universe today, at least as
far as I can tell.
Recently I have been having fun figuring out which new phone to buy. I
decided to get a smart phone that could run Python. If I lived in
Europe, or anywhere GSM rules, one of the Nokia series 60 would be a no
-brainer. But here in the USA, I will probably will wind up getting a
Windows based model.

I wonder whether we'll see Python plus user interface integration on
this device:

http://www.trolltech.com/products/qtopia/greenphone/index
Guess what: Folks have Tkinter up and running on Pocket PC's and
smartphones. I like that. Tkinter is everywhere. Don't forget, the
Komodo IDE has a Tk based GUI builder.

I guess a decent IDE comparison would make a good resource given the
repetitive "which IDE is best?" threads that appear on
comp.lang.python.
P.S. There is a 3 hour lecture by Dr. Sergio Rey of San Diego St. U. I
am putting up as a podcast. He teaches a course in Python in the
graduate department of Geographical Sciences. Python is heavily used in
that field of study (as is Tkinter).

The lecture is in 2 parts. Sound quality is excellent. <a
href="http://www.awaretek.com/python/index.html">Tkinter podcasts</a>

I'm a regular listener of your podcasts, and look forward to many more!

Paul
 
F

Fredrik Lundh

Paul said:
seem to have moved very far, despite Fredrik's efforts: what happened
to Tkinter 3000 or was that a codename for something else?

the first Tk3K project solved 95% of the problems (*) I had
with Tkinter:

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

(especially when combined with OpenGL).

don't leave home without it.

</F>

*) the remaining five are better handled by application-specific
abstractions. like most other things in Python.
 
B

BartlebyScrivener

Well, I am woefully unqualified to speak to the general state of Python
gui frameworks, but I am in a similar situation as the OP, i.e., a
beginner looking to TRY some easy gui programming in Python. Not being
a computer science person, just an amateur scripter, I tend to learn
best from lots of examples.

With all of that as background, I downloaded the latest wxPython demos
and docs yesterday. I suggest that the OP do the same. The demo.py
program is an amazing piece of work. It's loaded with specific examples
which allow you to view the frame or dialog etc, and then look behind
it to see the code used to create it.

rd
 
D

Douglas Soares de Andrade

Stephen Eilert escreveu:
You can also download wxGlade and ask it to generate the code for you.
You just have to layout the components the way you want it, wxGlade
does the rest. Even though there are tons of wxWidgets components it
does not support, you can put something as a placeholder and just
replace the code later.

For looks, speed, ease of use (even though it is not Pythonic),
platform compatibility and use of native widgets, my vote goes to
wxPython. If you don't mind adding another layer (as I doubt the
runtime performance suffers much - if at all), there is dabo.ui (thanks
to whoever pointed it out to me).

PyQT looks good... under KDE, alien under Win32.

PyQt4 is already out and trust me... Is it great :eek:)

Phil is doing a great job with it and Detlev (Eric3/4 developer) already
released some snapshots of eric4, so the windows python users can expect
a great python enviroment in the future.
 
S

Stephen Eilert

BartlebyScrivener said:
Well, I am woefully unqualified to speak to the general state of Python
gui frameworks, but I am in a similar situation as the OP, i.e., a
beginner looking to TRY some easy gui programming in Python. Not being
a computer science person, just an amateur scripter, I tend to learn
best from lots of examples.

With all of that as background, I downloaded the latest wxPython demos
and docs yesterday. I suggest that the OP do the same. The demo.py
program is an amazing piece of work. It's loaded with specific examples
which allow you to view the frame or dialog etc, and then look behind
it to see the code used to create it.

rd


You can also download wxGlade and ask it to generate the code for you.
You just have to layout the components the way you want it, wxGlade
does the rest. Even though there are tons of wxWidgets components it
does not support, you can put something as a placeholder and just
replace the code later.

For looks, speed, ease of use (even though it is not Pythonic),
platform compatibility and use of native widgets, my vote goes to
wxPython. If you don't mind adding another layer (as I doubt the
runtime performance suffers much - if at all), there is dabo.ui (thanks
to whoever pointed it out to me).

PyQT looks good... under KDE, alien under Win32. PyGTK looks good under
Gnome, and acceptable on Win32, even if their widgets do not always act
as Win32 users would expect.
 
M

Magnus Lycka

David said:
You're forgetting that Qt isn't just a widget toolkit.

I suspect that the non-GUI parts are (just like in Wx) C++ stuff
which is more or less equivalent with things that are either Python
builtins or parts of Python's standard library. Besides, getting
those proprietary dependencies even further down into the code than
the GUI is not a plus in my book.

Last time I looked, Qt code wasn't even pure C++ but needed some
preprocessing like embedded SQL. Yet another programming language
in other words. I suppose I can ignore that from Python, but it
still smells...
 
D

David Boddie

I suspect that the non-GUI parts are (just like in Wx) C++ stuff
which is more or less equivalent with things that are either Python
builtins or parts of Python's standard library. Besides, getting
those proprietary dependencies even further down into the code than
the GUI is not a plus in my book.

It depends on who you are. If you're writing GPL applications, whether
you use framework-specific classes for SQL, XML or networking (for
example) is more a question of making appropriate design choices.
If you're writing proprietary closed source applications, you're
probably paying for the benefits those dependencies bring.

One of the advantage of using Qt from Python is that you get a choice
of dependencies.
Last time I looked, Qt code wasn't even pure C++ but needed some
preprocessing like embedded SQL. Yet another programming language
in other words. I suppose I can ignore that from Python, but it
still smells...

You're referring to the meta-object compiler, I suppose. This has
been discussed many times by people who don't have the luxury of
being able to write all their code in Python; for example:

http://doc.trolltech.com/4.2/templates.html
http://www.scottcollins.net/articles/a-deeper-look-at-signals-and-slots.html

It's a trade off that some people choose to make to take advantage
of those features. Of course, Python has a perfectly good type
system, so you never need to preprocess Python code when you use PyQt.

David
 
J

Jarek Zgoda

Christophe napisa³(a):
You forgot that it is rather buggy on Win32 ( in my experience )

Didn't observe any W32-specific bugy behaviour during over 2 years of
development of JPA using PyGTK.
 
M

Mudcat

I have been using Tkinter for several years now. Recently I have been
thinking about switching to something else that may have a sharper
appearance. However I'm not sure what that may be, and if that
something else is *that* much better than what I'm already using.

Does everyone agree that wxPython looks best on Windows? I've also read
in a couple of places where Dabo looks pretty good as well.

So if someone were to pick a UI that gave the best appearance, what
would they choose?
 
P

Peter Decker

I have been using Tkinter for several years now. Recently I have been
thinking about switching to something else that may have a sharper
appearance. However I'm not sure what that may be, and if that
something else is *that* much better than what I'm already using.

Does everyone agree that wxPython looks best on Windows? I've also read
in a couple of places where Dabo looks pretty good as well.

Dabo uses wxPython, so it looks exactly the same. The difference is in
the coding: writing stuff in wxPython is like writing C++ code, while
creating GUIs in Dabo is like writing Python code. Dabo also has a lot
of tools for creating GUIs visually, but even if you don't use those,
Dabo is a huge improvement over raw wxPython.
 
F

Fredrik Lundh

Mudcat said:
I have been using Tkinter for several years now. Recently I have been
thinking about switching to something else that may have a sharper
appearance. However I'm not sure what that may be, and if that
something else is *that* much better than what I'm already using.

Tk 8.5 isn't that far away, though.

http://www.markroseman.com/tcl/guide85.html

</F>
 
T

timmy

Mudcat said:
I have been using Tkinter for several years now. Recently I have been
thinking about switching to something else that may have a sharper
appearance. However I'm not sure what that may be, and if that
something else is *that* much better than what I'm already using.

Does everyone agree that wxPython looks best on Windows? I've also read
in a couple of places where Dabo looks pretty good as well.

So if someone were to pick a UI that gave the best appearance, what
would they choose?
i've been using wxpython for a few years and it's great.
it's got far better widgets then tkinter and it's speed is greater on
large stuff as well.
it's got a great support forum and the maintainer robin dunn does a
great job of answering all questions.
i can't particularly fault wxpython. it looks great on all platforms and
maintain the native look and feel of the platofrm as well.
 
M

Mudcat

When you say far better widgets, do you mean that it has a greater
number of widgets to choose from, or that the types of widgets are
basically the same but have a greater amount of flexibility in them?

Personally I find programming in Tkinter fairly simple and
straight-forward. I'm sure a lot of that is due to the fact I've been
using it for a while and have many templates already available when I
start to work on something new. But I don't find myself questioning it
very much for unnecessary typing like I do other things.

As far as appearance goes, I've scoured the net looking for examples of
widgets produced wxPython or other UIs, and I really don't see that
much difference than Tkinter. Now I haven't done a whole lot of
programming on XP, but as far as W2000 is concerned they all look very
similar.

What would be really cool is if someone were to come up with a UI that
has a totally new look and feel than anything that currently exists on
Windows. It seems like most of the native look and feel, even in XP,
are rather boxy and stale. I don't like Macs, but they do have cool
looking windows and frames.

Now I hardly know anything at all about low-level windows calls and
what is/is not possible. But I know that many applications draw their
own windows, skins, and functionality widgets to provide a sharper
appearance. It seems like it would be possible for someone to draw
these widgets and provide an api to display them through Python.
 
P

Paul Rubin

Mudcat said:
When you say far better widgets, do you mean that it has a greater
number of widgets to choose from, or that the types of widgets are
basically the same but have a greater amount of flexibility in them?

There's a lot more and they look a lot better. Tk widgets are quite
stylized and independently of that they look like crap.
Personally I find programming in Tkinter fairly simple and
straight-forward.

Tkinter programming is not too bad once you get used to it, if you
don't mind the limited widget set and weird restrictions, that is
true. Plus, it's included in the Python distro, which is the main
reason I keep using it. That's worked ok for me because the apps I've
written with it just needed basic GUI functionality and were not too
demanding of stylistic fine points. But Tkinter seriously dated by
now, and I don't think its widgets are anywhere near slick enough for
wide-distribution desktop apps that have to look polished.
What would be really cool is if someone were to come up with a UI
that has a totally new look and feel than anything that currently
exists on Windows.

No that would suck. Best to try to stay as close as possible to the
native widgets on whatever the underlying platform is. If you want
to depart from the native UI, then start from scratch and write a whole
new window system with a complete app suite etc.
 
T

timmy

Mudcat said:
When you say far better widgets, do you mean that it has a greater
number of widgets to choose from, or that the types of widgets are
basically the same but have a greater amount of flexibility in them?


by better i mean more of them to choose from and the functionality they
provide.


when i started working with wx i discovered widgets i hadn't even seen
before. and if you can't find a widget to suit, it's easy to make one.
 
M

Mudcat

Paul said:
No that would suck. Best to try to stay as close as possible to the
native widgets on whatever the underlying platform is. If you want
to depart from the native UI, then start from scratch and write a whole
new window system with a complete app suite etc.

Ok. But other than thinking it would suck, you're basically repeating
my point about starting from scratch with a whole new suite of widgets.


I think there are situations where having an app that looks completely
different is a big bonus. Having developed apps for both engineers and
non-technical people alike, sometimes the non-techs are much more
impressed by the look/feel than what it actually does.

Sometimes you want a tool that blends in. Sometimes you want one that
stands out, especially when you're competing against other tools where
they all kind of look the same.
 

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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top