Tkinter vs PyGTK

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JyotiC

    #1

    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

  • Ravi Teja

    #2
    Re: Tkinter vs PyGTK


    JyotiC wrote:[color=blue]
    > 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[/color]

    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.

    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


    Comment

    • Paul Rubin

      #3
      Re: Tkinter vs PyGTK

      "Ravi Teja" <webraviteja@gm ail.com> writes:[color=blue]
      > Speed is not the main concern. You won't notice any speed differences
      > in a small application like that.[/color]

      That's wishful thinking--even a totally trivial tkinter program has
      noticable startup delay:
      [color=blue][color=green][color=darkred]
      >>> from Tkinter import *
      >>> a=Tk()[/color][/color][/color]

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

      Comment

      • Ravi Teja

        #4
        Re: Tkinter vs PyGTK

        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.

        Comment

        • Paul Rubin

          #5
          Re: Tkinter vs PyGTK

          "Ravi Teja" <webraviteja@gm ail.com> writes:[color=blue]
          > 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[/color]

          What OS? Try rebooting the box (to clear cache) and measuring again?

          Comment

          • JyotiC

            #6
            Re: Tkinter vs PyGTK

            Thanx for the help.

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

            Comment

            • gregarican

              #7
              Re: Tkinter vs PyGTK

              JyotiC wrote:
              [color=blue]
              > Thanx for the help.
              >
              > Does all gui's take time to load.
              > is there a way to dec this time.[/color]

              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 :-)

              Comment

              • Lunpa

                #8
                Re: Tkinter vs PyGTK

                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.

                Comment

                • mwt

                  #9
                  Re: Tkinter vs PyGTK

                  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.

                  Comment

                  Working...