473,396 Members | 2,024 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,396 software developers and data experts.

GTK or TKinter (or what else?)

Hi,
I use python under linux and would like to create some GUI applications. I
have seen that Python can be used together woth some different graphic
libraries and would like to have a suggestion about which one to use.
I feel like GTK is better documented bud would not like to create programs
which are not fully portable. Moreover, I know you can use wxWindows as
well... I have tried it in my C program and didn't like the way events were
handled. Are there any differences in Python?
Thanks
Marco
Jul 18 '05 #1
10 3593
On Wednesday 19 May 2004 11:57 pm, Marco Terzuoli wrote:
I use python under linux and would like to create some GUI applications.


Consider PyQt and/or PyKDE. You can get both from Riverbank:

http://riverbankcomputing.co.uk/

The reasons I like using these two, in no particular order:

Quality: Qt and KDE are both very well designed
Docs: Everything is documented
Polish: Most things are consistent
Tools: The GUI designer is awesome
Platforms: Reasonable portability to Mac and Windows
Quantity: More widgets than you can shake a stick at

--
Troy Melhase, tr**@gci.net
--
It is terrible to contemplete how few politicians are hanged. - G. K.
Chesterton
Jul 18 '05 #2
P
Marco Terzuoli wrote:
Hi,
I use python under linux and would like to create some GUI applications. I
have seen that Python can be used together woth some different graphic
libraries and would like to have a suggestion about which one to use.
I feel like GTK is better documented bud would not like to create programs
which are not fully portable. Moreover, I know you can use wxWindows as
well... I have tried it in my C program and didn't like the way events were
handled. Are there any differences in Python?
Thanks
Marco


I would definitely recommend GTK.
It has huge support being it now
and it's supported on windows now also.
I've some example apps here:
http://www.pixelbeat.org/talks/pygtk/

Pádraig.
Jul 18 '05 #3
In article <lb******************@news.indigo.ie>, <P@draigBrady.com> wrote:
Marco Terzuoli wrote:
Hi,
I use python under linux and would like to create some GUI applications. I
have seen that Python can be used together woth some different graphic
libraries and would like to have a suggestion about which one to use.
I feel like GTK is better documented bud would not like to create programs
which are not fully portable. Moreover, I know you can use wxWindows as
well... I have tried it in my C program and didn't like the way events were
handled. Are there any differences in Python?
Thanks
Marco


I would definitely recommend GTK.
It has huge support being it now
and it's supported on windows now also.
I've some example apps here:
http://www.pixelbeat.org/talks/pygtk/

Pádraig.


I've seen two follow-ups so far, one each expressing enthusiasm
for PyGTK and PyQt. I know that still other experienced developers
favor wxPython, and Tkinter, and ... I recommend to Mr. Terzuoli
that he detail his question even more precisely; I recommend to
those advising him that they contribute to the Wikis at <URL:
http://www.python.org/cgi-bin/moinmoin/GuiProgramming >
and <URL: http://www.python.org/cgi-bin/moinmoin/GuiProgramming >.

These questions come up soooooo often.
--

Cameron Laird <cl****@phaseit.net>
Business: http://www.Phaseit.net
Jul 18 '05 #4
In article <Sx*******************@twister2.libero.it>, Marco Terzuoli wrote:
I use python under linux and would like to create some GUI applications. I
have seen that Python can be used together woth some different graphic
libraries and would like to have a suggestion about which one to use.
I feel like GTK is better documented bud would not like to create programs
which are not fully portable. Moreover, I know you can use wxWindows as
well... I have tried it in my C program and didn't like the way events were
handled. Are there any differences in Python?


While not absolutely ideal for win32 because of look-and-feel issues, Gtk
does run well under win32. There's even a win32 theme, so it just comes
down to feel in a few places. Maybe someone else can speak to the Mac
situation.

Dave Cook
Jul 18 '05 #5
At some point, "David M. Cook" <da******@nowhere.net> wrote:
While not absolutely ideal for win32 because of look-and-feel issues, Gtk
does run well under win32. There's even a win32 theme, so it just comes
down to feel in a few places. Maybe someone else can speak to the Mac
situation.

Dave Cook


There is no native port of GTK+ 2 to the Mac, so you'd be stuck
running under the X server (not ideal). There is a port of GTK+ 1.2,
though (gtk-osx.sf.net).

--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
Jul 18 '05 #6
On 2004-05-20, Marco Terzuoli <ma************@libero.it> wrote:
[...] I know you can use wxWindows as well... I have tried it
in my C program and didn't like the way events were handled.
I had the same reaction.
Are there any differences in Python?


Not really, unless you use a higher-level wrapper on top of
wxWindows -- something like "wax". Wax hides most of the event
details.

--
Grant Edwards grante Yow! Are we THERE yet? My
at MIND is a SUBMARINE!!
visi.com
Jul 18 '05 #7
Marco Terzuoli wrote:
<snip>
...Moreover, I know you can use wxWindows as
well... I have tried it in my C program and didn't like the way events were
handled.


What didn't you like about the event handling? If it's the IDs and EVT_*
functions, they sort of remedied that in the most recent version (2.5).
Instead of this:
ID_SEARCH = wx.NewId()
button = wx.Button(parent, ID_search, "Search")
EVT_BUTTON(ID_SEARCH, searchFunction)
You can do this: button = wx.Button(parent, -1, "Search")
button.Bind(EVT_BUTTON, searchFunction)


Of course what would be really slick is if they implemented event
handling as kwargs[1]. Also, I hear that wxPython is Windows-centric, so
if you're developing on and/or mostly using Linux, you might be better
off with something else.
greg

[1] http://tinyurl.com/2n5gl I did a rough patch for this.
Jul 18 '05 #8
Greg Krohn wrote:
You can do this:
>>> button = wx.Button(parent, -1, "Search")
>>> button.Bind(EVT_BUTTON, searchFunction)


It would be nice if the need to pass all those -1s
could be eliminated as well...

--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg

Jul 18 '05 #9
In article <2h************@uni-berlin.de>, Greg Ewing wrote:
Greg Krohn wrote:
You can do this:
>>> button = wx.Button(parent, -1, "Search")
>>> button.Bind(EVT_BUTTON, searchFunction)


It would be nice if the need to pass all those -1s
could be eliminated as well...


Been there, whined about that. :)

Right now I'm using wax, (a wxWindows wrapper that hides some
of that sort of thing).

--
Grant Edwards grante Yow! Is there something
at I should be DOING with a
visi.com GLAZED DONUT??
Jul 18 '05 #10
Grant Edwards wrote:
Right now I'm using wax, (a wxWindows wrapper that hides some
of that sort of thing).


In relation to an earlier thread, I took a look through my
Qt book again, and noted that it does require passing in
the parent when creating a widget (although it is passed as
the last parameter which seems wrong to me) and the layout
and containment hierarchies are also different.

The '-1' issue can't really go away unless Python allowed
default arguments in the middle of an argument list, which
would probably be a bad thing.

Roger
Jul 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stewart Midwinter | last post by:
I would like to link the contents of three OptionMenu lists. When I select an item from the first list (call it continents), the contents of the 2nd list (call it countries) would update. And in...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
1
by: yvesd | last post by:
hello i want to intercept tkinter python system events like wm_delete_window and if possible for any window, but the newest code I've produced give me an error : Traceback (most recent call...
1
by: Kevin Walzer | last post by:
I'm not sure how often members of this list visit the Tkinter wiki at http://tkinter.unpythonic.net/wiki/FrontPage; this wiki seems to have less traffic in general than the Tcl/Tk wiki at...
7
by: krishnakant Mane | last post by:
hello all, I seam to have noticed this a bit late but it appears to me that tkinter is being used very widely for gui development on all platform? is that right? since fredric lundh has written a...
0
by: wolfonenet | last post by:
Hi All, My setup is: WinXP Python 2.5.1 TKinter version: $Revision: 50704 $ Tcl: 8.4 Debugger: WinPdb
1
kaarthikeyapreyan
by: kaarthikeyapreyan | last post by:
Beginners Game- Tic-Tac-Toe My first attempt after learning Tkinter from Tkinter import * import tkFont class myApp: """ Defining The Geometry of the GUI And the variables Used In the...
1
by: Noah | last post by:
I'm trying to match against Event.type for KeyPress and ButtonPress. Currently I'm using integer constants (2 and 4). Are these constants defined anywhere? The docs talk about KeyPress and...
8
by: karthikbalaguru | last post by:
Hi, One of my python program needs tkinter to be installed to run successfully. I am using Redhat 9.0 and hence tried installing by copying the tkinter-2.2.2-36.i386.rpm alone from the CD 3 to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.