GUI Frameworks in Python?

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

    GUI Frameworks in Python?

    I've recently been trying out various different GUI frameworks in Python and
    was wondering if I could get your input on the pros and cons of the
    different ones...

    wxPython: I love the programming side of wxPython, but I find it's just so
    slow to initialise in the first place.

    Tkinter: While it's fast to load up, the syntax has never really appealed to
    me

    GTK: Unknown - I'm looking into it today

    Qt: I have yet to manage to install it on my system

    Anything else?


    Hugh Macdonald


  • Peter Hansen

    #2
    Re: GUI Frameworks in Python?

    Hugh Macdonald wrote:
    [color=blue]
    > I've recently been trying out various different GUI frameworks in Python and
    > was wondering if I could get your input on the pros and cons of the
    > different ones...
    >
    > wxPython: I love the programming side of wxPython, but I find it's just so
    > slow to initialise in the first place.[/color]

    I don't understand this, though it's been mentioned before.

    On my machine, launching the wxPython Demo app takes roughly 0 seconds
    before the splash screen appears, and I can immediately click on it
    and get the app itself, for a total launch time of: immeasurably fast.

    I would think, given the size of the demo itself, that just about
    anything it does should be representative of other apps on the
    same machine.

    For the record, running WinXP AMD 2200 with adequate RAM etc.

    Are these reports of slow wxPython startup only coming from really old
    machines or something?

    -Peter

    Comment

    • Greg Krohn

      #3
      Re: GUI Frameworks in Python?

      Peter Hansen wrote:[color=blue]
      > ...
      > I don't understand this, though it's been mentioned before.
      >
      > On my machine, launching the wxPython Demo app takes roughly 0 seconds
      > before the splash screen appears, and I can immediately click on it
      > and get the app itself, for a total launch time of: immeasurably fast.[/color]

      On my machine (WinXP Pro, AMD 2400, 512MB) it takes a little over three
      seconds before the splash shows and maybe another two seconds for the
      main frame to show. It takes a little over a second to load IDLE.

      greg

      Comment

      • Peter Strempel

        #4
        Re: GUI Frameworks in Python?

        Greg Krohn wrote:
        [color=blue]
        > On my machine (WinXP Pro, AMD 2400, 512MB) it takes a little over three
        > seconds before the splash shows and maybe another two seconds for the
        > main frame to show. It takes a little over a second to load IDLE.[/color]

        Roughly the same here: 2-3 seconds for the Demo and my own wxPython app to
        start on a Mac G5. Around 3 seconds on my Pentium II 333 MHz with Linux and
        Win2000 as well - you don't need a GHz CPU to create a window with Python.
        The only limitation I can think of is limited memory so the OS needs to swap
        to free some space first. CPU speed is not a serious factor.


        I personally consider wxPython the best choice for a Python GUI. Tkinter
        apps look too alien to the common Windows enduser. Of course that depends on
        the target audience and might be an issue or not.

        Peter

        Comment

        • Phipps Xue

          #5
          Re: GUI Frameworks in Python?

          pyGTK is also a good GUI frameworks but it's not available now for windows
          platform. I suppose it's its most important shortage.

          Phipps
          "Hugh Macdonald" <HughMacdonald@ brokenpipefilms .com> wrote in message
          news:mailman.10 2.1080629227.20 120.python-list@python.org ...[color=blue]
          > I've recently been trying out various different GUI frameworks in Python[/color]
          and[color=blue]
          > was wondering if I could get your input on the pros and cons of the
          > different ones...
          >
          > wxPython: I love the programming side of wxPython, but I find it's just so
          > slow to initialise in the first place.
          >
          > Tkinter: While it's fast to load up, the syntax has never really appealed[/color]
          to[color=blue]
          > me
          >
          > GTK: Unknown - I'm looking into it today
          >
          > Qt: I have yet to manage to install it on my system
          >
          > Anything else?
          >
          >
          > Hugh Macdonald
          >
          >[/color]


          Comment

          • Hugh Macdonald

            #6
            Re: GUI Frameworks in Python?

            On Tue, 30 Mar 2004 16:11:55 +0800
            "Phipps Xue" <phipps.xue@sap .com> wrote:
            [color=blue]
            > pyGTK is also a good GUI frameworks but it's not available now for
            > windows platform. I suppose it's its most important shortage.[/color]

            I'm developing for Linux, so that's less of an issue for me.... Although I did check out the pyGTK module we've got installed here at work and it seems very slightly different from the version in the pyGTL tutorials(mainl oop() instead of main_loop(), GtkWindow() instead of Window()...)

            --
            Hugh Macdonald
            The Moving Picture Company

            Comment

            • P@draigBrady.com

              #7
              Re: GUI Frameworks in Python?

              Hugh Macdonald wrote:[color=blue]
              > I've recently been trying out various different GUI frameworks in Python and
              > was wondering if I could get your input on the pros and cons of the
              > different ones...
              >
              > wxPython: I love the programming side of wxPython, but I find it's just so
              > slow to initialise in the first place.
              >
              > Tkinter: While it's fast to load up, the syntax has never really appealed to
              > me
              >
              > GTK: Unknown - I'm looking into it today[/color]

              I have to recommend GTK, especially in combination with libglade.
              I've a presentation and a couple of sample apps here:


              Pádraig.

              Comment

              • Wilk

                #8
                Re: GUI Frameworks in Python?

                "Hugh Macdonald" <HughMacdonald@ brokenpipefilms .com> writes:
                [color=blue]
                > I've recently been trying out various different GUI frameworks in Python and
                > was wondering if I could get your input on the pros and cons of the
                > different ones...
                >
                > wxPython: I love the programming side of wxPython, but I find it's just so
                > slow to initialise in the first place.
                >
                > Tkinter: While it's fast to load up, the syntax has never really appealed to
                > me
                >
                > GTK: Unknown - I'm looking into it today
                >
                > Qt: I have yet to manage to install it on my system
                >
                > Anything else?[/color]

                I'm very happy with web interface :-)

                --
                Wilk - http://flibuste.net

                Comment

                • Mike Thompson

                  #9
                  Re: GUI Frameworks in Python?

                  Hugh Macdonald wrote:[color=blue]
                  >
                  > Qt: I have yet to manage to install it on my system
                  >[/color]

                  Its relatively easy to install and evaluate Qt/PyQt and Eric3
                  (associated IDE) on a Linux box. That's the easy path.

                  But its a LOT of work to try on a Windows box. Both Qt and PyQt have
                  licenses which allow non-commercial use on Linux but ONLY commercial use
                  on Windows and NO easy path to an evaluation version.

                  I requested an evaluation versions of Qt for Windows from TrollTech and
                  didn't get a response for 5 days. Even then it was a response asking
                  for more detailed information about me, my company and the purpose of
                  the evaluation. Nothing wrong with that, of course, except the whole
                  process suddenly looked to be a very protracted one. It wasn't even
                  clear to me that I could then get an evaluation licence for PyQt. I gave
                  up. Too hard.

                  In the end, I found the easiest way to *partially* evaluate PyQt on
                  Windows is to download the evaluation version of the "BlackAdder " IDE
                  from "The Kompany". BlackAdder is a toy IDE (IMO) but it does give you
                  evaluation access to most of the Qt/PyQt libs and to 'Designer' the VERY
                  IMPRESSIVE GUI builder that comes with Qt. The Qt/PyQt libs provided
                  with BlackAdder do not include some important parts of the full Qt/PyQt
                  combination: data aware widgets, etc.

                  I also note that even full PyQt does not support the ActiveX parts of Qt
                  which turned out to be a problem for me. Phil Thompson (Mr PyQt) seems
                  interested in adding ActiveX support, but nothing is there yet.

                  Also Note: Eric3 is an impressive IDE that targets PyQt development. But
                  you can't seem to evaluate it on windows, even if you have the
                  BlackAdder demo version installed, because it requires a component that
                  only comes with the full Qt/PyQt lib.

                  So all in all, I wouldn't even try to evaluate PyQt/Qt on Windows, just
                  go straight to a Linux box. (And be aware of the ActiveX limitations of
                  PyQt once you get back to Windows).

                  You also need to be aware of the cost of PyQt/Qt. Its expensive! About
                  US$2500 for Qt (per seat) and 250 English pounds for PyQt (per seat).

                  Buying BlackAdder seems to give you access to a subset of the full
                  PyQt/Qt libraries at a significantly reduced cost.

                  [color=blue]
                  >
                  > Anything else?
                  >[/color]

                  No. You've covered the main ones.

                  If evaluating wxPython, you may also want to look at wxDesigner. It not
                  a patch on Qt's Designer, but it seemed to me to be the best available.
                  There's also wxGlade and Boa.


                  BTW, I was recently reacquainted with VisualWorks (Smalltalk from
                  CinCom) ... not THAT's an IDE!! What a shame Python was nothing to come
                  close, despite both languages sharing a similar dynamic nature.

                  --
                  Mike

                  Comment

                  • Peter Hickman

                    #10
                    Re: GUI Frameworks in Python?

                    Hugh Macdonald wrote:[color=blue]
                    > I've recently been trying out various different GUI frameworks in Python and
                    > was wondering if I could get your input on the pros and cons of the
                    > different ones...
                    >
                    > wxPython: I love the programming side of wxPython, but I find it's just so
                    > slow to initialise in the first place.[/color]

                    Not noticed this myself but I would like to add here that wxPython is
                    wonderfully portable. I have run wxPython apps on my OSX machine that
                    were developed exclusively on a Windows machine without any problems.

                    Portability is my biggest concern when writing GUI code so I would push
                    for wxPython.

                    Comment

                    • Jon Willeke

                      #11
                      Re: GUI Frameworks in Python?

                      Hugh Macdonald wrote:
                      [color=blue]
                      > On Tue, 30 Mar 2004 16:11:55 +0800
                      > "Phipps Xue" <phipps.xue@sap .com> wrote:
                      >
                      >[color=green]
                      >>pyGTK is also a good GUI frameworks but it's not available now for
                      >>windows platform. I suppose it's its most important shortage.[/color]
                      >
                      >
                      > I'm developing for Linux, so that's less of an issue for me.... Although I did check out the pyGTK module we've got installed here at work and it seems very slightly different from the version in the pyGTL tutorials(mainl oop() instead of main_loop(), GtkWindow() instead of Window()...)[/color]

                      I can't vouch for it, but the following FAQ entry describes using PyGTK
                      on Windows:

                      <http://www.async.com.b r/faq/pygtk/index.py?req=sh ow&file=faq21.0 12.htp>

                      If you're going to evaluate PyGTK, do yourself a favor and look at 2.0,
                      or later. If it has GtkWindow, it's ancient. If it has gtk.Window,
                      it's recent. While a GUI builder isn't essential, I recommend also
                      looking at GLADE 2 and libglade.

                      Comment

                      • Fuzzyman

                        #12
                        Re: GUI Frameworks in Python?

                        "Hugh Macdonald" <HughMacdonald@ brokenpipefilms .com> wrote in message news:<mailman.1 02.1080629227.2 0120.python-list@python.org >...[color=blue]
                        > I've recently been trying out various different GUI frameworks in Python and
                        > was wondering if I could get your input on the pros and cons of the
                        > different ones...
                        >
                        > wxPython: I love the programming side of wxPython, but I find it's just so
                        > slow to initialise in the first place.
                        >[/color]

                        Never tried it - see below :-)
                        [color=blue]
                        > Tkinter: While it's fast to load up, the syntax has never really appealed to
                        > me
                        >[/color]

                        'Programming Python' has an excellent introduction.. so I started with
                        Tkinter thinking that when I hit restrictions I could move onto wx. I
                        haven't yet reached the point where Tkinter restricts me. Whereas
                        there are a couple of widgets missing from the standard distribution,
                        Tkinter *can* be used to make clean and modern looking interfaces.....
                        And the syntax isn't too gawky once you've climbed the initial
                        learning curve.
                        [color=blue]
                        > GTK: Unknown - I'm looking into it today
                        >[/color]

                        Is this Linux only ?
                        (pardon my terrible ignorance...)
                        [color=blue]
                        > Qt: I have yet to manage to install it on my system
                        >[/color]
                        Although *technically* cross platform, windoze users can't get a free
                        version... so I'm never going to bother looking at it...

                        On the other hand Kodos - (a regular expression tool) has an
                        'executable' version with the libraries bundled with it. And the GUI
                        it has is very nice. Whether it would be possible to extract the
                        windoze libraries from the Kodos executable distribution is an
                        interesting question - lol.
                        [color=blue]
                        > Anything else?
                        >[/color]

                        Anyway - most of my contribution is mad rambling.....

                        Regards,

                        Fuzzy


                        [color=blue]
                        >
                        > Hugh Macdonald[/color]

                        Comment

                        • Peter Hansen

                          #13
                          Re: GUI Frameworks in Python?

                          Greg Krohn wrote:
                          [color=blue]
                          > Peter Hansen wrote:
                          >[color=green]
                          >> ...
                          >> I don't understand this, though it's been mentioned before.
                          >>
                          >> On my machine, launching the wxPython Demo app takes roughly 0 seconds
                          >> before the splash screen appears, and I can immediately click on it
                          >> and get the app itself, for a total launch time of: immeasurably fast.[/color]
                          >
                          > On my machine (WinXP Pro, AMD 2400, 512MB) it takes a little over three
                          > seconds before the splash shows and maybe another two seconds for the
                          > main frame to show. It takes a little over a second to load IDLE.[/color]

                          The first time I launched IDLE, it took almost three seconds. (I don't
                          have the Python installer compile .py files ahead of time.) After that
                          it takes about one second as well.

                          I'm curious about the differences with wxPython. Three seconds seems
                          unusually long when on a slightly slower machine I can do it in well
                          under a second. Was that the first time you ran it? Many other apps
                          open? I have over 256MB RAM free when I try this...

                          -Peter

                          Comment

                          • Hugh Macdonald

                            #14
                            Re: GUI Frameworks in Python?

                            On 30 Mar 2004 05:18:58 -0800
                            michael@foord.n et (Fuzzyman) wrote:
                            [color=blue]
                            > 'Programming Python' has an excellent introduction.. so I started with
                            > Tkinter thinking that when I hit restrictions I could move onto wx. I
                            > haven't yet reached the point where Tkinter restricts me. Whereas
                            > there are a couple of widgets missing from the standard distribution,
                            > Tkinter *can* be used to make clean and modern looking interfaces.....
                            > And the syntax isn't too gawky once you've climbed the initial
                            > learning curve.[/color]

                            For me, the issue with TK is less the restrictions it imposes and more the way of writing it in the first place.
                            [color=blue][color=green]
                            > > GTK: Unknown - I'm looking into it today
                            > >[/color]
                            >
                            > Is this Linux only ?
                            > (pardon my terrible ignorance...)[/color]

                            Yeah - it is... I'n only developing for Linux here...
                            [color=blue][color=green]
                            > > Qt: I have yet to manage to install it on my system
                            > >[/color]
                            > Although *technically* cross platform, windoze users can't get a free
                            > version... so I'm never going to bother looking at it...[/color]

                            That doesn't bother me - everything I'm writing is for in-house use only, and would only ever be run on Linux...

                            Thanks for everyones thoughts... I'm actually planning on sticking with wxPython for the moment. I've decided that I can live with the extra few seconds to load up, although I don't like it...

                            --
                            Hugh Macdonald
                            The Moving Picture Company

                            Comment

                            • Roel Schroeven

                              #15
                              Re: GUI Frameworks in Python?

                              Peter Hansen wrote:
                              [color=blue]
                              > Hugh Macdonald wrote:
                              >[color=green]
                              >> wxPython: I love the programming side of wxPython, but I find it's
                              >> just so slow to initialise in the first place.[/color]
                              >
                              > I don't understand this, though it's been mentioned before.
                              >
                              > On my machine, launching the wxPython Demo app takes roughly 0 seconds
                              > before the splash screen appears, and I can immediately click on it
                              > and get the app itself, for a total launch time of: immeasurably fast.
                              >
                              > I would think, given the size of the demo itself, that just about
                              > anything it does should be representative of other apps on the
                              > same machine.[/color]

                              Whenever I make even the smallest wxPython program, it takes multiple
                              seconds before the window is visible. Last time I tried was on a Pentium
                              4-M 2.2 GHz with 512 MB of RAM. Not a slow machine, and other software
                              runs just fine.

                              It's really annoying, and nothing I do seems to improve the situation.

                              --
                              "Codito ergo sum"
                              Roel Schroeven

                              Comment

                              Working...