Stable GUI

Discussion in 'Python' started by Viktor, Feb 16, 2005.

  1. Viktor

    Viktor Guest

    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...
    Viktor, Feb 16, 2005
    #1
    1. Advertising

  2. Viktor

    Lars Guest

    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
    Lars, Feb 16, 2005
    #2
    1. Advertising

  3. Viktor

    Birdman Guest

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

    http://www.ferg.org/easygui/

    >From the web page:

    " 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."
    Birdman, Feb 16, 2005
    #3
  4. Viktor

    Viktor Guest

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


    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
    Viktor, Feb 16, 2005
    #4
  5. Viktor

    Viktor Guest

    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.
    Viktor, Feb 16, 2005
    #5
  6. Viktor

    Peter Hansen Guest

    Re: Stable GUI + wxPython memory leak

    Viktor wrote:
    > 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.


    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
    Peter Hansen, Feb 17, 2005
    #6
  7. Viktor

    Lars Guest

    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
    Lars, Feb 17, 2005
    #7
  8. Viktor

    Jarek Zgoda Guest

    Lars napisa³(a):

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


    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/
    Jarek Zgoda, Feb 17, 2005
    #8
  9. Viktor

    Viktor Guest

    Re: Stable GUI + wxPython memory leak

    Peter Hansen wrote:
    > On which platform?


    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:

    >>> from Tkinter import *
    >>> l = Listbox()
    >>> l.pack()
    >>> for i in range(200000):

    .... l.insert('end', str(i)) # Occupy memory
    ....
    >>> l.delete(0, 'end') # Free the memory


    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

    >>> l.distroy()
    >>> del l

    ?!

    Thank You.
    Viktor, Feb 17, 2005
    #9
  10. Re: Stable GUI + wxPython memory leak

    Viktor wrote:

    > 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


    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>
    Fredrik Lundh, Feb 17, 2005
    #10
  11. Re: Stable GUI + wxPython memory leak

    Peter Hansen <> wrote:
    >Viktor wrote:
    >> 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.

    >On which platform?
    >
    >And how are you measuring this apparent memory consumption?


    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 -- -- 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
    Sion Arrowsmith, Feb 17, 2005
    #11
  12. Am Wed, 16 Feb 2005 06:19:27 -0800 schrieb Viktor:

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


    Hi,

    For me pygtk is enough stable and fast.

    The reference is good:
    http://www.pygtk.org/pygtk2reference/index.html


    Thomas

    --
    Thomas Güttler, http://www.thomas-guettler.de/
    Thomas Guettler, Feb 17, 2005
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. clintonG

    Is 2.0 AdRotator Stable?

    clintonG, Mar 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    325
    clintonG
    Mar 27, 2006
  2. metfan

    Is JDK5.0 stable enough?

    metfan, Nov 23, 2004, in forum: Java
    Replies:
    6
    Views:
    719
    Oscar kind
    Nov 24, 2004
  3. Katerina McLean
    Replies:
    2
    Views:
    720
    Jacob
    Dec 13, 2004
  4. Rico
    Replies:
    8
    Views:
    2,753
    Alin Sinpalean via JavaKB.com
    Dec 31, 2004
  5. Bruce Lee

    How stable is 1.5?

    Bruce Lee, Oct 30, 2005, in forum: Java
    Replies:
    5
    Views:
    1,407
    Bruce Lee
    Nov 8, 2005
Loading...

Share This Page