Bearophile>This can be fixed with a different dictionary that doesn't
contain the leading 0s,<
No other dict is necessary:
! _nibbles = {"0":"", "1":"0001", "2":"0010", "3":"0011",
! "4":"0100", "5":"0101", "6":"0110", "7":"0111",
! "8":"1000", "9":"1001", "A":"1010",
Dennis Lee Bieber:
>Yes, but only when ref-counts go to 0... it may be that this tight loop never
>allowed stuff to go to 0 ref-counts. It definitely never returned control, so
>besides eating memory that way, any events for the GUI framework were also not
>being handled and had to be queued.<
Witn your suggestions and with some tests and work I've solved most of
the problems, thank you all for the comments.
Peter Hansen:
>What did you expect to happen with the infinite loop inside dogo()?<
I expected that the same memory used by the b.config(command=...) can
be used by the successive
> ! import Tkinter
> ! def dogo():
> ! while 1:
> ! b.config(command=lambda:None)
> ! root = Tkinter.Tk()
> ! b = Tkinter.Button(root, text="Go", command=dogo)
> ! b.pack()
> ! root.mainloop()
I guess tkinter has to keep a name-reference pair (some days a
discussion about this arose
[EMAIL PROTECTED] wrote:
> I am still ignorant about Tkinter. This little program, after pressing
> the "Go" eats more and more RAM, is it normal? Can it be avoided? (In
> normal programs this is isn't a real problem).
>
> ! import Tkinter
> ! def dogo():
> ! while 1:
> ! b.config(comm