Tix, spinboxes, and 1>=5

cjbackhouse at gmail.com cjbackhouse at gmail.com
Wed Feb 22 21:37:37 EST 2006


This odd bug has been annoying me for several days now. I finally got
round to making this, frankly hilarious, testcase:


from Tix import *

def sayfive(num):
    if num<5: print num,"< 5"
    else: print num,">= 5"

sayfive(4)
sayfive(6)
rootwnd=Tk()
Control(rootwnd,command=sayfive).pack()
rootwnd.mainloop()


So, our program starts, the first two lines executed write "4<6" "6>=5"
as expected. Now the user changes the value in the spinner, and we get
output like "1>=5". What magic is Tix pulling, and more importantly how
the hell do I stop it?




More information about the Python-list mailing list