473,509 Members | 3,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tkinter vs PyGTK

I want to make a stand alone gui. Whose work is to get the diff options
from user and run a shell script based on them.

I wanna know which one is better to use Tkinter or PyGTK, in terms of
efficiency and functionality.

I hv read about Tkinter, but it takes too much time to load, is there
a way to make it faster.
Is all gui take more time to load, this is the first time i am making a
gui.
wIll PyGtk be faster.
Is there any other way of making a gui using python

Thanx in advance

Apr 12 '06 #1
8 16700

JyotiC wrote:
I want to make a stand alone gui. Whose work is to get the diff options
from user and run a shell script based on them.

I wanna know which one is better to use Tkinter or PyGTK, in terms of
efficiency and functionality.

I hv read about Tkinter, but it takes too much time to load, is there
a way to make it faster.
Is all gui take more time to load, this is the first time i am making a
gui.
wIll PyGtk be faster.
Is there any other way of making a gui using python

Thanx in advance


Speed is not the main concern. You won't notice any speed differences
in a small application like that.

Python has many ways of building a GUI.
http://wiki.python.org/moin/GuiProgramming
Everyone has their favorite(s). It is impossible to get a good opinion
on this. A GUI toolkit choice can be quite complex since there are many
variables. It is a decision you will have to make yourself.

If your needs are simple (just get a few options and not concerned
about layout details and other functionality), try something along the
lines of
http://wiki.woodpecker.org.cn/moin/EasyGuider

Apr 12 '06 #2
"Ravi Teja" <we*********@gmail.com> writes:
Speed is not the main concern. You won't notice any speed differences
in a small application like that.


That's wishful thinking--even a totally trivial tkinter program has
noticable startup delay:
from Tkinter import *
a=Tk()


takes several seconds if the page cache isn't preloaded. I doubt
PyGTK is any faster, though.
Apr 12 '06 #3
Not from here.
A highly unscientific measurement, using execution time from SciTe on
my 3.5 yr old box.

Python startup - 0.272 sec
With your snippet for Tk - 0.402 sec

0.13 sec is trivial in my book.

Apr 12 '06 #4
"Ravi Teja" <we*********@gmail.com> writes:
A highly unscientific measurement, using execution time from SciTe on
my 3.5 yr old box.

Python startup - 0.272 sec
With your snippet for Tk - 0.402 sec


What OS? Try rebooting the box (to clear cache) and measuring again?
Apr 12 '06 #5
Thanx for the help.

Does all gui's take time to load.
is there a way to dec this time.

Apr 12 '06 #6
JyotiC wrote:
Thanx for the help.

Does all gui's take time to load.
is there a way to dec this time.


Have you tried loading a Java GUI app through launching the Java
Virtual Machine? That's pretty slow too. And that's a bytecode compiled
medium. Unfortunately most interpreted programming languages like Perl,
Ruby, Python, etc. are pretty slow loading initial GUI environments.
That's the performance penalty that is offset by the benefits and
efficiency of coding in a very high level language. Less than a second
of load time doesn't seem to be too much of a detraction in my book,
however. If you want pure speed you would need to code in a true
compiled programming language such as C (e.g. - GTK GUI toolkit), C++
(e.g. - Qt GUI toolkit), etc. But what fun is that :-)

Apr 12 '06 #7
makes me wonder how useable pygui is now...

I made the mistake of using wxpython a while back... having something
that runs perfectly in windows, and *sorta* works in other platforms
hardly counts as cross platform, imho. And they wonder why tkinter is
shipped with python while wxpython is not...

Personaly, I would just use Tkinter untill a new gui library comes
along that actualy works in platforms people use, not just the one the
dev prefers. Setting up gtk in windows can be a daunting task for
some, though for projects that I know probably won't see the anyone
else's machine, I just use pygtk, for consistency with the rest of my
apps.

I guess this was slightly off topic, but I think its also important to
consider who might be using your apps when picking out a gui to use.

Apr 13 '06 #8
mwt
I've had a good experience with Pygtk. I made a small app called
"Protein Think" that monitors a folding@home client. The front end is
extremely simple - basically a notebook with five small pages. It runs
well and was a breeze to create. Looks much better than Tkinter, if
that matters at all to you.

Apr 13 '06 #9

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

Similar topics

3
6994
by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter...
5
4736
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...
10
3600
by: Marco Terzuoli | last post by:
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...
25
3321
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...
0
1323
by: Michele Simionato | last post by:
I am in the process of learning pygtk and I would like to port some custom made Tkinter widgets to pygtk, just an exercise. For instance I have this code: .. from Tkinter import * .. .. class...
0
1469
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...
0
1662
by: Sebastien Aubry | last post by:
Hello, I am trying to embed a Tkinter widget (TkZinc, http://www.tkzinc.org) inside a PyGtk HMI. A guru gave me this advice: "I think you can do some magic using the XID of the Tkinter...
32
7435
by: Kevin Walzer | last post by:
I'm a Tcl/Tk developer who has been working, slowly, at learning Python, in part because Python has better support for certain kinds of applications that I want to develop than Tcl/Tk does....
4
1979
by: fabdeb | last post by:
Hi every one, I m a sysadmin who want to know how to use python. I dont know anything about oriented object programation, i only know bash and a little perl. I have some simple questions about...
0
7237
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,...
0
7137
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...
1
7073
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
7506
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...
1
5062
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...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
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 ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.