How come wxPython isn't in the standard library?

  • Thread starter =?ISO-8859-1?Q?BJ=F6rn_Lindqvist?=
  • Start date
J

Jon Perez

Jon said:
Without that tear-off menu disabled, I bet you won't be
able to tell that a modern Tkinter app from a native Win32
one.

should have read...

With the tear-off menu function disabled, I bet you won't
be able to tell a modern Tkinter app from a native Win32
one in many cases.
 
J

Jeff Shannon

Jon said:
I think there's another reason not to standardize on
wxPython and it's that its API is not at all pythonic.
It reminds me too much of a C++ API.


Indeed, one of wxPython's design criteria is that it remains fairly
close to the underlying C++ API -- it is explicitly a fairly thin
wrapper, not a complete retooling. (Though there are several retoolings
built on top of wxPython, notably PythonCard.)

I think that, despite the sometimes awkwardness for Python programmers,
this is a laudable goal. For one, it means that it's that much easier
to combine Python and C++ in a single wxPython/wxWidgets multilanguage
application. For another, considering that wxPython is essentially a
one-man project, it means that Robin can spend more time exposing
functionality and less time hiding syntax, so that overall wxPython ends
up being more powerful than it would otherwise. ;)

On the other hand, I *do* agree that the non-Pythonic API does make for
a barrier in including wxPython in the standard library. The initial
learning curve for wxPython is rather steeper than that for Tkinter
(though it isn't at all bad if one already has C++ GUI programming
experience). Especially when starting from zero, it's easier to figure
out how to get a simple GUI running under Tkinter. The downside of
Tkinter is that it is, in general, less flexible and less powerful than
wxPython -- simple stuff is easier in Tkinter, but complex stuff is
generally harder.

Personally, I much prefer using wxPython. (But then, I did play around
with C/C++ Windows programming long before I discovered Python.)
However, I can also see that the Tkinter toolkit is more appropriate for
standard-lib usage than wxPython is. And really, it's not like it's all
that difficult to install both Python and wxPython when distributing an
application...

Jeff Shannon
Technician/Programmer
Credit International
 
C

Christophe Cavalaria

Jon said:
Tkinter is a lot less ugly today than it used to be because
Tk has adopted a more native look (i'm talking about windows
here, dunno about other platforms).

Motif on Unix ! Ugliest of all ( well, maybe there is worse )
 
R

R.Marquez

Jon said:
With the tear-off menu function disabled, I bet you won't
be able to tell a modern Tkinter app from a native Win32
one in many cases.

Question: Will a tkInter app change appearance when the user changes
from XP to Classic Theme (or any other 3rd party theme) accordingly
as wxPython apps do?

Will it use the standard Windows File Open/Save dialogs?

Just wondering, not meaning to be antagonistic.

-Ruben
 
P

Peter Hansen

Jon said:
I think there's another reason not to standardize on
wxPython and it's that its API is not at all pythonic.
It reminds me too much of a C++ API.

Tkinter's is far easier to use and learn. (PyGtk would be
2nd while PyQt's API, in my experience is just as C++-like and
hard to understand as wxPython's)

This appears to be a matter of opinion. I found Tkinter
very difficult to understand, and never did get to the point
where I could just write code with it, always spending my
time frustrated with things not doing what I thought they
were supposed to do and having a hard time finding examples
that matched my goals.

Strangely enough, given how often people complain about wxPython's
documentation, I didn't really find Tkinter much better.
Tkinter's two real cons are that:
a) it is [supposed to be] ugly (but see my replies below)
b) it is an additional layer and thus slow

I also concede both of those points.

In a nutshell, it's very clear from the past discussions in
this forum that *both* frameworks have a place, along with
(apparently, though I've not used it) PyQT and some of the
less mature efforts that are trying to build on top of one
or more of these.

This is an area where one solution will never please everybody,
so asking for wxPython to go into the standard library is
pointless. Tkinter is there already so leave it be, but use
whatever you find to be most effective.

-Peter
 
J

Jon Perez

Yes. It looks like for the most part it will use the
Win32 controls instead of drawing its own.
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top