Stable GUI

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

    #1

    Stable GUI

    Which GUI is the most stable one? I don't need any fancy looking
    widgets (look and feel doesn't realy matter to me), I "just" need it
    to be rock stable and fast...
  • Lars

    #2
    Re: Stable GUI

    Hi Viktor,

    By fast what do you mean exactly? Imho all the usual gui-toolkits
    pythonistas use are quite fast enough for most applications. You can
    use Tkinter ofcourse, and with the extra "Tix" module you get lots
    widgets. It's not the prettiest toolkit in the world, but it does the
    job well. And it's very programmer friendly.
    A step up would be to use wxWindows or Qt (wxPython and pyQt
    respectively), both are fast and stable as far as I know, and they are
    more powerful than Tk, generally speaking.

    Maybe you should describe your particular application and the reasons
    why you really need lightspeed widget rendering ? Stability goes
    without saying:)

    Regards
    Lars

    Comment

    • Birdman

      #3
      Re: Stable GUI

      Check out EasyGui. It's easy to use/modify Tinker:


      [color=blue]
      >From the web page:[/color]
      " Experienced Pythonistas need support for quick and dirty GUI
      features. New Python programmers need GUI capabilities that don't
      require any knowledge of Tkinter, frames, widgets, callbacks or lambda.
      This is what EasyGUI provides. Using EasyGUI, all GUI interactions are
      invoked by simple function calls.

      " EasyGUI is different from other GUIs in that EasyGUI is NOT
      event-driven. It allows you to program in a traditional linear fashion,
      and to put up dialogs for simple input and output when you need to. If
      you have not yet learned the event-driven paradigm for GUI programming,
      EasyGUI will allow you to be productive with very basic tasks
      immediately. Later, if you wish to make the transition to an
      event-driven GUI paradigm, you can do so with a more powerful GUI
      package such as anygui, PythonCard, Tkinter, wxPython, etc."

      Comment

      • Viktor

        #4
        Re: Stable GUI

        Lars wrote:[color=blue]
        > Maybe you should describe your particular application and the reasons
        > why you really need lightspeed widget rendering ? Stability goes
        > without saying:)[/color]

        It's a GUI for some database input, output routines. It sopouse to wark
        24h/day, and about 150 input-outputs/h.

        Fast: Because it's going to work on some old machines PI or PII, so I
        don't need any *lightspeed*, but I don't wan't to wait 5s to open a new
        Frame or something like that.
        Stable: I tought that thay are, but wxPython broke on some simple test
        programs that came with wxPython-demo. Tkinter newer broke, but neather
        the programs I wrote were somthing complicated.

        Thanks

        Comment

        • Viktor

          #5
          Re: Stable GUI + wxPython memory leak

          I just noticed that wxPython is leaking memory?! Playing with
          wxPython-demo, I started with 19MB used, and ended whith almost 150MB
          used?!
          It's wxPython 2.5.3.1 running on Python 2.4.

          Comment

          • Peter Hansen

            #6
            Re: Stable GUI + wxPython memory leak

            Viktor wrote:[color=blue]
            > I just noticed that wxPython is leaking memory?! Playing with
            > wxPython-demo, I started with 19MB used, and ended whith almost 150MB
            > used?!
            > It's wxPython 2.5.3.1 running on Python 2.4.[/color]

            On which platform?

            And how are you measuring this apparent memory consumption?

            And what happens (assuming you're on Windows) if you minimize
            the window? What does the memory usage show as then? And if
            you then restore the window but do nothing else with it?

            Memory consumption is a very difficult thing to measure
            properly in the best of circumstances, and if you're merely
            running the demo it seems unlikely you're observing a real "leak".

            -Peter

            Comment

            • Lars

              #7
              Re: Stable GUI

              I've used Tkinter quite extensively for various tools, but never for
              anything big. I believe it will work nicely for a data input type of
              application. I don't know if you'll experience significant "lag" when
              updating app-windows on old pentiums, but it shouldn't be a problem.
              Mind you, the machines should have a decent amount of ram (I guess
              around 128 mb and upwards is reasonable).
              The only problem I've ever encountered was with updating Tk widgets
              from threads in a threaded app - it won't work. The solution was
              nothing worse than using an output queue, and having an event check the
              output buffer every second or so.

              The Tcl/TK crowd probably have more extensive experience with using Tk
              and Tix for bigger long running apps, maybe you can ask them for more
              info?

              Good luck with your app!
              Lars

              Comment

              • Jarek Zgoda

                #8
                Re: Stable GUI

                Lars napisa³(a):
                [color=blue]
                > The only problem I've ever encountered was with updating Tk widgets
                > from threads in a threaded app - it won't work. The solution was
                > nothing worse than using an output queue, and having an event check the
                > output buffer every second or so.[/color]

                I know literally no GUI toolkit, that allows direct updating of GUI
                objects from any other thread that the one which created them. Some even
                do not allow updating from any other thread than main application thread
                and this may be really painful.

                --
                Jarek Zgoda
                http://jpa.berlios.de/ | http://www.zgodowie.org/

                Comment

                • Viktor

                  #9
                  Re: Stable GUI + wxPython memory leak

                  Peter Hansen wrote:[color=blue]
                  > On which platform?[/color]

                  On Linux, and I'm watching the percentage of used memory with *top* or
                  *ps v* (I have 256 MB). The aplication started with 19% used and after
                  45 minutes playing I saw i eat up almost 70%.

                  I also noticed that:
                  [color=blue][color=green][color=darkred]
                  >>> from Tkinter import *
                  >>> l = Listbox()
                  >>> l.pack()
                  >>> for i in range(200000):[/color][/color][/color]
                  .... l.insert('end', str(i)) # Occupy memory
                  ....[color=blue][color=green][color=darkred]
                  >>> l.delete(0, 'end') # Free the memory[/color][/color][/color]

                  Doesn't free the memory. The memory stays occupied. OK, when I do the
                  same thing again, no additional memory is occupied. He uses the same
                  memory allocated first time, but why doesn't he free it and why memory
                  isn't fread up even if I explicitly call
                  [color=blue][color=green][color=darkred]
                  >>> l.distroy()
                  >>> del l[/color][/color][/color]
                  ?!

                  Thank You.

                  Comment

                  • Fredrik Lundh

                    #10
                    Re: Stable GUI + wxPython memory leak

                    Viktor wrote:
                    [color=blue]
                    > Doesn't free the memory. The memory stays occupied. OK, when I do the
                    > same thing again, no additional memory is occupied. He uses the same
                    > memory allocated first time, but why doesn't he free it and why memory
                    > isn't fread up even if I explicitly call[/color]

                    the memory is released, but it's still assigned to the process. if, how and when it's
                    returned to the operating system depends on a lot of things, most of which are out-
                    side Python's control.

                    (fwiw, this is how dynamic memory management works on most platforms).

                    </F>



                    Comment

                    • Sion Arrowsmith

                      #11
                      Re: Stable GUI + wxPython memory leak

                      Peter Hansen <peter@engcorp. com> wrote:[color=blue]
                      >Viktor wrote:[color=green]
                      >> I just noticed that wxPython is leaking memory?! Playing with
                      >> wxPython-demo, I started with 19MB used, and ended whith almost 150MB
                      >> used?!
                      >> It's wxPython 2.5.3.1 running on Python 2.4.[/color]
                      >On which platform?
                      >
                      >And how are you measuring this apparent memory consumption?[/color]

                      And what are you doing to the demo to provoke it? (I've had a
                      wxPython application significantly increase its memory footprint
                      on Windows just from opening a file dialog.)

                      --
                      \S -- siona@chiark.gr eenend.org.uk -- http://www.chaos.org.uk/~sion/
                      ___ | "Frankly I have no feelings towards penguins one way or the other"
                      \X/ | -- Arthur C. Clarke
                      her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

                      Comment

                      • Thomas Guettler

                        #12
                        Re: Stable GUI

                        Am Wed, 16 Feb 2005 06:19:27 -0800 schrieb Viktor:
                        [color=blue]
                        > Which GUI is the most stable one? I don't need any fancy looking
                        > widgets (look and feel doesn't realy matter to me), I "just" need it
                        > to be rock stable and fast...[/color]

                        Hi,

                        For me pygtk is enough stable and fast.

                        The reference is good:



                        Thomas

                        --
                        Thomas Güttler, http://www.thomas-guettler.de/


                        Comment

                        Working...