Tix Meter, erratic behavior

Hugo Gonz?lez hugonz at hotmail.com
Sat Sep 11 02:00:57 EDT 2004


Hi, I'm doing a simple text with the Tix Meter widget, in a program as
follows

import Tix
import time

mainwin=Tix.Tk()
container=Frame(mainwin)

bar=Tix.Meter(container, value=0.0)

bar.pack()

for i in range(100)
    time.sleep(1)
    bar.configure(value=(i/100.0)

-------------

I'm doing this in the interactive editor and I'd expects this gives me
a progresss bar that advances a number every second. When I run this,
the script would become irresponsive, and after Ctl-C the widget will
display with the last value reached in the -for- loop.

Does anyone have a clue why it is not doing what I expect? Can you
give it a try in your interpreter? What am I doing wrong?

Thanks all in advance..

Hugo



More information about the Python-list mailing list