By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,932 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,932 IT Pros & Developers. It's quick & easy.

PyGTK or wXPython?

P: n/a
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
Sep 13 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Rod W wrote:
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
-----------------------------------
Alessandro Bottoni
Sep 13 '05 #2

P: n/a
> (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
Sep 13 '05 #3

P: n/a
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.)

Sep 13 '05 #4

P: n/a
On 9/13/05, Rod W <ro******@removeme.gmail.com> wrote:
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.

--

# p.d.
Sep 13 '05 #5

P: n/a
Peter Decker a écrit :
On 9/13/05, Rod W <ro******@removeme.gmail.com> wrote:
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.


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.
Sep 13 '05 #6

P: n/a
On 2005-09-13, Peter Decker <py******@gmail.com> wrote:

[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.
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.


--
Grant Edwards grante Yow! Here I am at the flea
at market but nobody is buying
visi.com my urine sample bottles...
Sep 13 '05 #7

P: n/a
On 9/13/05, Grant Edwards <gr****@visi.com> wrote:
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!

--

# p.d.
Sep 13 '05 #8

P: n/a
TPJ napisa³(a):
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?


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.

--
Jarek Zgoda
http://jpa.berlios.de/
Sep 13 '05 #9

P: n/a
Jarek Zgoda wrote:
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.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com

Sep 13 '05 #10

P: n/a
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

Sep 14 '05 #11

P: n/a
Am Tue, 13 Sep 2005 07:01:57 -0700 schrieb 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.


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

--
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: ni**************@thomas-guettler.de

Sep 14 '05 #12

P: n/a
Rod W wrote:
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?
Sep 14 '05 #13

P: n/a
Paul McNett napisa³(a):
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.


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.

--
Jarek Zgoda
http://jpa.berlios.de/
Sep 14 '05 #14

P: n/a
Magnus Lycka wrote:
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.
Sep 15 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.