473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PyGTK or wXPython?

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
14 13324
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
> (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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dennis Sylvester | last post by:
Interested in any opinions, studies, etc., concerning the GUI tool(s) to use for Python. Specifically, which would you recommend (and why) for building GUI apps in Python: TKinter BOA PyQT ...
2
by: Charlie Kim | last post by:
hi all. I made gnome applet with pyGTK and gnome application with wxPython. When I tried import wxPython application in pyGTK applet it crashed with message: GThread-ERROR **: GThread system...
5
by: carljohan.rehn | last post by:
I would like like to start doing some GUI-programming in Python, but don't know which library to choose. Tkinter seems a bit old. Correct me if I am wrong! The layout doesn't look as nice as for...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
22
by: dcrespo | last post by:
Hi all... I think wxPython is much better than PyGTK. First of all, PyGTK needs the GTK runtime installed, whereas wxPython is entirely Python's modules, so It facilitates the apps'...
0
by: Sebastien Aubry | last post by:
Hello, I happen to use in my programs a widget based on Tkinter Canvas. It is Zinc (http://www.tkzinc.org), which allows to draw using transparency, gradients, translations, rotations, ... using...
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
12
by: icarus | last post by:
platform: windows xp professional, python 2.5, wxpython When I double-check on my program file test.py (for simplicity I'll be using this code below), I see the window just fine. But the ms-dos...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.