Stable GUI

V

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

Lars

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
 
B

Birdman

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

Viktor

Lars said:
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
 
V

Viktor

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

Peter Hansen

Viktor said:
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
 
L

Lars

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
 
J

Jarek Zgoda

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

Viktor

Peter said:
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:
.... l.insert('end', str(i)) # Occupy 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
?!

Thank You.
 
F

Fredrik Lundh

Viktor said:
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>
 
S

Sion Arrowsmith

Peter Hansen said:
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.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top