Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Stable GUI

Reply
Thread Tools

Stable GUI

 
 
Viktor
Guest
Posts: n/a
 
      02-16-2005
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...
 
Reply With Quote
 
 
 
 
Lars
Guest
Posts: n/a
 
      02-16-2005
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

 
Reply With Quote
 
 
 
 
Birdman
Guest
Posts: n/a
 
      02-16-2005
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."

 
Reply With Quote
 
Viktor
Guest
Posts: n/a
 
      02-16-2005
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

 
Reply With Quote
 
Viktor
Guest
Posts: n/a
 
      02-16-2005
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.

 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      02-17-2005
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
 
Reply With Quote
 
Lars
Guest
Posts: n/a
 
      02-17-2005
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

 
Reply With Quote
 
Jarek Zgoda
Guest
Posts: n/a
 
      02-17-2005
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/
 
Reply With Quote
 
Viktor
Guest
Posts: n/a
 
      02-17-2005
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.

 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      02-17-2005
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>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Baseline GUI Architecture (was: Baseline GUI Prototype?) Stefan Ram Java 3 11-20-2011 02:18 AM
PyGTK GUI update without signals from GUI Andrew Lapidas Python 0 04-12-2008 11:07 PM
GUI - GUI value passing paul.foreman Java 5 10-25-2004 08:06 AM
GUI and non-GUI data Hal Fulton Ruby 1 08-05-2004 08:42 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM



Advertisments