Tkinter vs PyGTK

J

JyotiC

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
 
R

Ravi Teja

JyotiC said:
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
 
P

Paul Rubin

Ravi Teja said:
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:

takes several seconds if the page cache isn't preloaded. I doubt
PyGTK is any faster, though.
 
R

Ravi Teja

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

Paul Rubin

Ravi Teja said:
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?
 
J

JyotiC

Thanx for the help.

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

gregarican

JyotiC said:
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 :)
 
L

Lunpa

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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top