473,804 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3633
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.ind igo.ie>, <P@draigBrady.c om> 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************ *******@twister 2.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******@nowhe re.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)phy sics(dot)mcmast er(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(paren t, ID_search, "Search")
EVT_BUTTON(ID_S EARCH, searchFunction)
You can do this: button = wx.Button(paren t, -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(paren t, -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(paren t, -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

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

Similar topics

2
4638
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 turn the contents of the 3rd list (call it states would be updated by a change in the 2nd list. If anyone can share a recipe or some ideas, I'd be grateful! Here's some sample code that displays three OptionMenus, but doesn't update the list...
0
2362
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 widget, but for some reason the text is invisible on cygwin). After I close the Toplevel widget, all of the menus in my app behave as though they have no contents to them, i..e I can press on the File menu button, and see it depress, but the Exit...
1
3603
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 I am hoping someone knows what I am doing wrong: 1) Pressing the Settings.. Button multiple times, brings up many instances of the Settings Panel. I just want it to bring up one. Is there an easy way to do that?
1
5260
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 last): File "C:\Documents and Settings\yvesd\Bureau\protowin.py", line 36, in ? b1 = Tkinter.Button (win1)
1
2975
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 http://wiki.tcl.tk. Given that, I hope it's not out of line for me to call attention to several pages that I've posted about integrating Tile (http://tktable.sourceforge.net/tile) and TableList (http://www.nemethi.de, http://wiki.tcl.tk/5527) into...
7
1954
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 very good introduction to tkinter (was that just an intro?), I have got keen interest to know the following. may be fredric himself might put some light on these points. 1. I seriously don't intend to start a flame war but does tkinter stand...
0
1549
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
5668
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 The methods
1
2041
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 ButtonPress, but I don't see them in any of the Tkinter source files. Are these just magic values that come out of the TK side of things and are not defined in Python? Code like this makes me think I'm doing something wrong: if event.type == 2:...
8
3290
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 my pc. But, it is not getting installed and is failing by throwing the below errors. Should i need to configure / install any specific files for resolving this issue ?
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10302
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.