GUI Frameworks in Python?

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

    #31
    Re: GUI Frameworks in Python?

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

    Did you try a preload? You can start an invisible task that keeps
    the wxpython stuff in memory. You could even start this task as a
    Win32 service so that it is loaded prior to any login.

    BTW, the load time is not only due to GUI libs. Python itself does
    also have a share. Just tried that with a command line script and
    my rough estimate is that approx. 50% of the wxpython load delay
    is due to Python itself (at least on my machine: Win 2000, 800MHz,
    256 MByte).

    Mit freundlichen Gruessen,

    Peter Maas

    --
    -------------------------------------------------------------------
    Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
    Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas@mplu sr.de
    -------------------------------------------------------------------

    Comment

    • Jørgen Cederberg

      #32
      Re: GUI Frameworks in Python?

      Gary Herron wrote:[color=blue]
      > On Tuesday 30 March 2004 05:35 am, Hugh Macdonald wrote:
      >[color=green][color=darkred]
      >>>>GTK: Unknown - I'm looking into it today
      >>>
      >>>Is this Linux only ?
      >>>(pardon my terrible ignorance...)[/color]
      >>
      >>Yeah - it is... I'n only developing for Linux here...[/color]
      >
      >[/color]
      <snip GTK _is_ cross-platform>[color=blue]
      >
      > Here's several pointers:
      > http://www.async.com.br/faq/pygtk/in...=faq21.012.htp
      > http://www.pcpm.ucl.ac.be/~gustin/win32_ports/
      >
      > Gary Herron
      >[/color]

      Hi,

      i downloaded and installed the GTK runtime environment v. 2.2.4-2 and
      PyGTK 2.2.0 for Python 2.3. The installation went fine and I added the
      path to GTK/lib and bin. I run a helloworld program, but unfortunely I
      get this error message which I quite puzzled about (translated from danish)

      (helloworld.py: 3308): Gtk-WARNING **: Could not find the theme engine in
      module_path: 'wimp'

      Does anyone have clue what to do?

      Regards
      Jorgen Cederberg

      Comment

      • Roel Schroeven

        #33
        Re: GUI Frameworks in Python?

        Peter Maas wrote:[color=blue]
        > Roel Schroeven wrote:
        >[color=green]
        >> 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.[/color]
        >
        >
        > Did you try a preload? You can start an invisible task that keeps
        > the wxpython stuff in memory. You could even start this task as a
        > Win32 service so that it is loaded prior to any login.[/color]

        That might be a good idea -- I'll try that the next time I'm doing some
        wxPython work.
        [color=blue]
        > BTW, the load time is not only due to GUI libs. Python itself does
        > also have a share. Just tried that with a command line script and
        > my rough estimate is that approx. 50% of the wxpython load delay
        > is due to Python itself (at least on my machine: Win 2000, 800MHz,
        > 256 MByte).[/color]

        In my experience, loading Python itself is very fast. Perhaps not if it
        isn't yet cached in memory, but afterwards that doesn't seem to be where
        the problem is.

        That said, I just tried a simple little program, and it seems to be much
        faster than what I remember from 6 months ago. I'm not doing any
        wxPython work right now, but I'll do some more checking before
        complaining about startup speed again.

        --
        "Codito ergo sum"
        Roel Schroeven

        Comment

        • Andrew Malcolmson

          #34
          Re: GUI Frameworks in Python?

          GUI's seem to be more like documents than programs, so I wonder why
          we're not considering more declarative type interface builders. Is
          there such a thing, maybe that writes out a standard specification
          file instead of code? If it were XML, you could write a XSL filter to
          make the all the modifications you needed to accomodate a different
          platform.

          Another thing: I understand that Miguel de (I forget), the Gnome guy,
          has stated that the two programs that really have done cross platform
          best are Mozilla and Abiword. There was once a Python binding for
          Mozilla's widget library XUL but I don't don't what's happended to
          that. Anone know if this is relevant to our discussion of cross
          platform GUI's?

          Comment

          • Peter Hansen

            #35
            Re: GUI Frameworks in Python?

            Andrew Malcolmson wrote:[color=blue]
            > GUI's seem to be more like documents than programs, so I wonder why
            > we're not considering more declarative type interface builders.[/color]

            Mitch Kapor talked about this, I believe, as being part of the
            Chandler project's approach, at the Birds-Of-a-Feather session on
            Chandler at PyCon last week.

            There might be notes about this somewhere, maybe in the docs on


            -Peter

            Comment

            • Lars Heuer

              #36
              Re: GUI Frameworks in Python?

              Hi Andrew,
              [color=blue]
              > best are Mozilla and Abiword. There was once a Python binding for
              > Mozilla's widget library XUL but I don't don't what's happended to
              > that. Anone know if this is relevant to our discussion of cross
              > platform GUI's?[/color]

              I think, Mozilla is relevant for x-platform GUIs
              There is an interesting project (but wrong licence, in IMO), called
              MozPython, which embeds Python into Mozilla.


              pyXPCOM is still alive, but I think, the lack of pyXPCOM documentation
              is a problem here.
              ActiveState's Komodo is build with Mozilla and pyXPCOM


              Another problem of Mozilla / XUL is, that you've to switch between
              your programming languages: JavaScript for XUL and your favorite
              programming language in the back. If your favorite programming lang
              is JavaScript, you don't have to switch, of course. ;)

              If someone is interested in Mozilla as platform, than the following
              sources might be helpful:

              XUL / XPCOM



              ActiveState's site abt. pyXPCOM


              http://pyxpcom.mozdev.org/ (outdated / dead?)

              IBM dW serie about pyXPCOM




              Best regards,
              Lars


              Comment

              • Lars Heuer

                #37
                Re: GUI Frameworks in Python?

                [color=blue]
                > If someone is interested in Mozilla as platform, than the following
                > sources might be helpful:[/color]

                .... and of course:
                "Creating Applications with Mozilla"


                Best regards,
                Lars


                Comment

                • Lothar Scholz

                  #38
                  Re: GUI Frameworks in Python?

                  Peter Hansen <peter@engcorp. com> wrote in message news:<qYCdna1kj d3fBPTdRVn-tw@powergate.ca >...
                  [color=blue]
                  >
                  > Go figure. (And as I said this is an AMD 2200 with 512MB RAM, XP Pro.)[/color]

                  You and all others miss one important number: What a harddisk are you
                  using ?
                  A notebook with a 4200rpm has a much lower startup time then a
                  7200rpm. It is as strange as a 10 against 2 seconds for the same
                  program on WinXP when compiled with Borland instead MS Visual C.

                  Comment

                  • Josiah Carlson

                    #39
                    Re: GUI Frameworks in Python?

                    > GUI's seem to be more like documents than programs, so I wonder why[color=blue]
                    > we're not considering more declarative type interface builders. Is
                    > there such a thing, maybe that writes out a standard specification
                    > file instead of code? If it were XML, you could write a XSL filter to
                    > make the all the modifications you needed to accomodate a different
                    > platform.[/color]

                    Dude, you should really check out the wxXMLResource and
                    wxXMLResourceHa ndler. I don't use XML to write GUIs, but if I did,
                    those would be my savior.

                    Download the wxPython demo and give it a look.

                    - Josiah

                    Comment

                    • Dave Reed

                      #40
                      Re: GUI Frameworks in Python?


                      I second the recommendation of Gtk/Glade/libglade with Python. I've
                      used it to write large programs and can confirm that gtk2 will also
                      work on Windows (although I haven't done much other than verify it
                      works). I've written some software to further automate the process of
                      writing GUI programs using Glade/libglade. I'm putting the finishing
                      touches on an article I will be submitting to Linux Journal describing
                      the software. It will hopefully be published in the July issue. I will
                      be releasing the software under the GPL license.

                      I am almost certain that on Linux/Unix wxWindows is just a layer on
                      top of gtk so gtk will certainly be a little faster than
                      wxWindows. I'm not certain what wxWindows runs on top of on MS
                      Windows.

                      Dave



                      Comment

                      • Peter Hansen

                        #41
                        Re: GUI Frameworks in Python?

                        Lothar Scholz wrote:
                        [color=blue]
                        > Peter Hansen <peter@engcorp. com> wrote in message news:<qYCdna1kj d3fBPTdRVn-tw@powergate.ca >...
                        >
                        >[color=green]
                        >>Go figure. (And as I said this is an AMD 2200 with 512MB RAM, XP Pro.)[/color]
                        >
                        >
                        > You and all others miss one important number: What a harddisk are you
                        > using ?
                        > A notebook with a 4200rpm has a much lower startup time then a
                        > 7200rpm. It is as strange as a 10 against 2 seconds for the same
                        > program on WinXP when compiled with Borland instead MS Visual C.[/color]

                        An excellent question...

                        My hard disk is a "lightning fast" Seagate 120GB 7200 RPM Serial-ATA
                        drive with liquid bearings and an 8MB cache...

                        Clearly it's those liquid bearings that make it so fast. ;-)

                        -Peter

                        Comment

                        • JanC

                          #42
                          Re: GUI Frameworks in Python?

                          Lars Heuer <python@quixs.c om> schreef:
                          [color=blue]
                          > Another problem of Mozilla / XUL is, that you've to switch between
                          > your programming languages: JavaScript for XUL and your favorite
                          > programming language in the back. If your favorite programming lang
                          > is JavaScript, you don't have to switch, of course. ;)[/color]

                          But look at what Mozilla.org are planning:
                          <http://www.mozilla.org/events/dev-day-feb-2004/mozilla-futures/langs.html>

                          --
                          JanC

                          "Be strict when sending and tolerant when receiving."
                          RFC 1958 - Architectural Principles of the Internet - section 3.9

                          Comment

                          • Lorenzo Gatti

                            #43
                            GTK2 Windows installation Was: Re: GUI Frameworks in Python?

                            Jørgen Cederberg <jorgencederber g@hotmail.com> wrote in message news:<Fqwac.538 $_n1.337@news.g et2net.dk>...
                            [color=blue]
                            >
                            > Hi,
                            >
                            > i downloaded and installed the GTK runtime environment v. 2.2.4-2 and
                            > PyGTK 2.2.0 for Python 2.3. The installation went fine and I added the
                            > path to GTK/lib and bin. I run a helloworld program, but unfortunely I
                            > get this error message which I quite puzzled about (translated from danish)
                            >
                            > (helloworld.py: 3308): Gtk-WARNING **: Could not find the theme engine in
                            > module_path: 'wimp'
                            >
                            > Does anyone have clue what to do?
                            >
                            > Regards
                            > Jorgen Cederberg[/color]

                            I had the same harmless warning and I moved libwimp.dll to
                            somewhere\GTK\2 .0\lib\gtk-2.0\2.2.0\engin es (a new directory, sister
                            of "loaders" and "immodules" ).

                            Lorenzo Gatti

                            Comment

                            • Chris Perkins

                              #44
                              Re: GUI Frameworks in Python?

                              Peter Hansen <peter@engcorp. com> wrote in message news:<XbGdnfXcw oMmNvTdRVn-tA@powergate.ca >...
                              [color=blue]
                              > Running that repeatedly (sorry, can't reboot conveniently
                              > right now, so can't get the first time) it takes 0.125 s
                              > on my machine.
                              >[/color]

                              Nobody seems to have mentioned wxPython version numbers in this
                              discussion.

                              I just upgraded from 2.4.2.4 to 2.5.1.5, and the start-up time for the
                              demo app went from about 5 seconds to less than a second.


                              Chris

                              Comment

                              • Peter Hansen

                                #45
                                Re: GUI Frameworks in Python?

                                Chris Perkins wrote:
                                [color=blue]
                                > Peter Hansen <peter@engcorp. com> wrote in message news:<XbGdnfXcw oMmNvTdRVn-tA@powergate.ca >...
                                >
                                >[color=green]
                                >>Running that repeatedly (sorry, can't reboot conveniently
                                >>right now, so can't get the first time) it takes 0.125 s
                                >>on my machine.[/color]
                                >
                                > Nobody seems to have mentioned wxPython version numbers in this
                                > discussion.
                                >
                                > I just upgraded from 2.4.2.4 to 2.5.1.5, and the start-up time for the
                                > demo app went from about 5 seconds to less than a second.[/color]

                                I've been running 2.4.1.2 on Python 2.3.3... If I had the same
                                absolute speedup going to 2.5.1.5 it would be running before
                                I managed to click on its icon! ;-)

                                -Peter

                                Comment

                                Working...