PyGTK or wXPython?

R

Rod W

I'm just starting out on Python but my primary goal is to provide
applications with some user interface (GUI).

Can someone point me to a good comparison of whether I should use
wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)?

I'd prefer open source (not necessarily GPL though) tools.

Rod
 
A

Alessandro Bottoni

Rod said:
I'm just starting out on Python but my primary goal is to provide
applications with some user interface (GUI).

Can someone point me to a good comparison of whether I should use
wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)?

I'd prefer open source (not necessarily GPL though) tools.

Rod

Both the wxWidgets and the GTK web sites have some good comparison sheet
and/or a "why I should use this platform" page. Many reviews and articles
can be found on the web by searching for "PyGTK wxPython comparison" or
"Python GUI toolkits".

Anyway, the main difference between PyGTK and wxPython is the type of GUI
that is generated on Windows. PyGTK uses the Windows porting of GTK and has
its own Look&Feel (similar to Gnome, I could say). wxPython, like
wxWidgets, uses the native MFC widgets and have the same Look&Feel of any
other MFC application (indistiguishable from any other native Windows app).
On Linux, PyGTK and wxPython are equivalent because both use GTK for
rendering the GUI. (I do not use/program/own any McOS system, so I cannot
tell you anything about the Apple Platform).

Beside this, wxPython (and wxWidgets) is often told to be more complete,
better documented and better supported than GTK/PyGTK.

HTH
 
W

Wolfgang Keller

(I do not use/program/own any McOS system, so I cannot
tell you anything about the Apple Platform).

WxPython _can_ give you a native Mac "look and feel", if you are
willing to take into account certain issues (such as e.g. menu bars not
tied to windows, no MDI, no multi-pane etc.). It is afaik _not_
automatic.

PyGTK uses X. There are window managers available which try to emulate
an Aqua "look", but there's afaik no way to detach the menu bar from
the window etc...

If you are willing to GPL your own applications, PyQt is another
option.

Sincerely,

Wolfgang Keller
 
T

TPJ

Beside this, wxPython (and wxWidgets) is often told to be more complete,
better documented and better supported than GTK/PyGTK.

Is wxPython often told to be more documented? By who?

Several months ago I wanted to choose a nice GUI for Python (Tkinter
was out of question). I choosed PyGTK for one reason - it was much,
much better documented than wxPython.

I have tried to write programs using wxPython and I have always ended
looking for some details in wxPython's docs for hours. I think that
wxPython has more widgets (and therefore one can say it's more
complete) - but it's an advantage only when these extra widgets are
needed. It has also another advantage over PyGTK - the native look and
feel. Write a program in wxPython and it will look natively on the
system it will be run. But the documentation of wxPython is just ugly
in comparison to the documentation of PyGTK. (Well - it was so in June
this year.)
 
P

Peter Decker

I'm just starting out on Python but my primary goal is to provide
applications with some user interface (GUI).

Can someone point me to a good comparison of whether I should use
wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)?

I'd prefer open source (not necessarily GPL though) tools.

I looked at both, and preferred wxPython's look. I hated its C-like
feeling, with some very un-Pythonic code that failed to hide its C
roots very well, but I used it because the results were so good.

Since then I've discovered Dabo, which is a complete application
framework, and which wraps wxPython for its UI. Apparently, the
authors of Dabo also didn't like the style of wxPython code, and have
created their own classes that expose a cleaner, much more Pythonic
API. I've been using Dabo for some small GUI apps, and I still can't
believe how much easier it is to create the UI with Dabo than with
plain wxPython. You should definitely check it out if you decide to go
the wxPython route.
 
G

Grant Edwards

[regarding wxGTK vs wxPython]
I looked at both, and preferred wxPython's look. I hated its
C-like feeling, with some very un-Pythonic code that failed to
hide its C roots very well, but I used it because the results
were so good.

Since then I've discovered Dabo, which is a complete
application framework, and which wraps wxPython for its UI.
Apparently, the authors of Dabo also didn't like the style of
wxPython code, and have created their own classes that expose
a cleaner, much more Pythonic API.

Yea, the wxPython API is pretty clunky in a few areas due to
the fact that it's a pretty thin wrapper around a C API. Don't
get me started about that silly ID parameter. I've been using
wxPython for 3-4 years, and have _never_ passed an ID other
than -1. That tells you something in the API is fundamentally
wrong. The whole bit-mapped "flag" parameter is nasty as well
(not to mention the fact that since it contains more than one
boolean value the parameter should have been named 'flags'
rather than 'flag'.

Anyway, there are some lighter-weight wrappers that make the
API more Pythonic and hide the nasty stuff like the id and flag
parameters. I tried "wax" a while back and it looked
promising.
 
C

Christophe

Peter Decker a écrit :
I looked at both, and preferred wxPython's look. I hated its C-like
feeling, with some very un-Pythonic code that failed to hide its C
roots very well, but I used it because the results were so good.

Since then I've discovered Dabo, which is a complete application
framework, and which wraps wxPython for its UI. Apparently, the
authors of Dabo also didn't like the style of wxPython code, and have
created their own classes that expose a cleaner, much more Pythonic
API. I've been using Dabo for some small GUI apps, and I still can't
believe how much easier it is to create the UI with Dabo than with
plain wxPython. You should definitely check it out if you decide to go
the wxPython route.

There's Wax which is a cleaner pythonic API on top of wxPython.

Myself, I would go the PyQT way because the API is very clean and
there's one less abstraction layer on top of it.
 
P

Peter Decker

Anyway, there are some lighter-weight wrappers that make the
API more Pythonic and hide the nasty stuff like the id and flag
parameters. I tried "wax" a while back and it looked
promising.

I looked at Wax, too, but as of last spring it was barely being
developed. I read that they got some money from the Summer of Code
thing that Google sponsored, so I don't know if that injected any
sustainable life into Wax. Dabo is very active; I've seen requests for
features added to the product the same day!
 
J

Jarek Zgoda

TPJ napisa³(a):
Is wxPython often told to be more documented? By who?

By me, for example. But I don't mind using wxWidgets C++ API
documentation as wxPython reference (Python differences are listed
there, in most cases).

I would use wx, if it wasn't so dog slow on linux. Qt and GTK are much
faster, but each one has disadvantages. Finally, you get 3 GUI toolkits,
of which each claims to be "cross-platform", but each is working at
acceptable level of WTF only on one system (wx on Windows, Qt and GTK on
linux) and the most appealing (Qt) has no free version for Windows.
 
P

Paul McNett

Jarek said:
I would use wx, if it wasn't so dog slow on linux. Qt and GTK are much
faster, but each one has disadvantages. Finally, you get 3 GUI toolkits,
of which each claims to be "cross-platform", but each is working at
acceptable level of WTF only on one system (wx on Windows, Qt and GTK on
linux) and the most appealing (Qt) has no free version for Windows.

I must say, I haven't found wx to be slow on Linux at all. Slow on Mac,
yes, but faster on Linux than on Windows (and getting much much better
on Mac). The exception to this is the StyledTextControl, which is by far
much faster on Windows, and with lots of styled text dog-slow on Linux.

Wx does use the native underlying toolkit for the platform (Qt is
owner-drawn), which can cause some platform inconsistencies.
 
P

paron

Just a thought -- you might consider using a HTTP/browser UI. It's
graphically ugly, but it's familiar for users, and it goes
cross-platform very well.

Plus, if you decide to move the app to a Web server, you're already
done.

Ron
 
T

Thomas Guettler

Am Tue, 13 Sep 2005 07:01:57 -0700 schrieb TPJ:
Is wxPython often told to be more documented? By who?

Several months ago I wanted to choose a nice GUI for Python (Tkinter
was out of question). I choosed PyGTK for one reason - it was much,
much better documented than wxPython.

Yes, the pyGTK documentation ist good. For me, the pyGTK API is
easier than the API of wxPython.

I switched from wxPython to pyGTK.

I don't know if you can create standalone applications
for windows, without installing gtk on the client.

Thomas
 
M

Magnus Lycka

Rod said:
I'm just starting out on Python but my primary goal is to provide
applications with some user interface (GUI).

Can someone point me to a good comparison of whether I should use
wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)?

What OS(es) do yo need to support?

I'm curious about PyGTK on Windows. It seems to me that the GTK+
Windows port is lagging behind a bit (no 2.8?), doesn't look or
behave quite as native windows apps do, is clunky to install, and
isn't as stable and complete as e.g. wxPython. Am I wrong?
 
J

Jarek Zgoda

Paul McNett napisa³(a):
I must say, I haven't found wx to be slow on Linux at all. Slow on Mac,
yes, but faster on Linux than on Windows (and getting much much better
on Mac). The exception to this is the StyledTextControl, which is by far
much faster on Windows, and with lots of styled text dog-slow on Linux.

Wx does use the native underlying toolkit for the platform (Qt is
owner-drawn), which can cause some platform inconsistencies.

GTK is "native" on Gnome or Xfce desktops, so programs written with
PyGTK/wxPython may have shorten startup times than comparable PyQt
applications. On KDE the Qt toolkit is "native", so GTK and wx
applications would be much slower, as there will be need to load the
whole GUI toolkit library at your program startup.
 
R

Rod W

Magnus said:
What OS(es) do yo need to support?

My apps will mostly be run on Windows desktops, but there are some Linux
users.
I'm curious about PyGTK on Windows. It seems to me that the GTK+
Windows port is lagging behind a bit (no 2.8?), doesn't look or
behave quite as native windows apps do, is clunky to install, and
isn't as stable and complete as e.g. wxPython. Am I wrong?

The GTK+ port is lagging behind on Windows (I think they have a 2.6
port). GTK+ doesn't look exactly like Windows, but the install is clean
and easy - I use GIMP on Windows for graphic editing and it works just
fine (it used to be worse)

I'm leaning towards PyGTK because it seems less clunky than wxPython on
wxWidgets.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top