Farshid Lashkari schrieb: > Schüle Daniel wrote: >> I don't understand what is the difference between commented lines >> 1 and 2 >> >> with 1 uncommented and 2 commented it works as expected >> with 1 commented and 2 uncommented the picture doesn't appear > > > I'm not familiar with Tkinter, but it seems as thought with 2, the > "image" variable is garbage collected after the constructor of Main is > called. With 1, you save a reference to the image, so it does not get > garbage collected.
thx for quick reply :) image is local variable of imageLabel I would expect that in case imageLabel lives, it should hold alife objects bound to its local variables I am just curious *why* reference to image is not hold by imageLabel which on his part is hold by frame1 .. which is hold by global root Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list