Dear All,
I am writting an application using Tkinter and I have the following
(annoying problem). I have a class to display randomly tips when the
program starts. It shows a dialog with a lamp image on the left and a
text message on the right with the tip, and I am selecting randomly a
tip from the database. If I use the "import random" in the class to
select with
tip = random.randint(0,len(TipDialog.tips)-1)
the random tip, at the exit of the program I get the following messages
for all PhotoImages I have loaded:
Exception _tkinter.TclError: <_tkinter.TclError instance at
0x2aaaae09b758> in <bound method PhotoImage.__del__ of
<Tkinter.PhotoImage instance at 0x2aaaae1ae320>> ignored
Exception _tkinter.TclError: <_tkinter.TclError instance at
0x2aaaae09b758> in <bound method PhotoImage.__del__ of
<Tkinter.PhotoImage instance at 0x2aaaae1ae368>> ignored
Exception _tkinter.TclError: <_tkinter.TclError instance at
0x2aaaae20a6c8> in <bound method PhotoImage.__del__ of
<Tkinter.PhotoImage instance at 0x2aaaaed34f38>> ignored
Exception _tkinter.TclError: <_tkinter.TclError instance at
0x2aaaae20a6c8> in <bound method PhotoImage.__del__ of
<Tkinter.PhotoImage instance at 0x2aaaaed34f80>> ignored
...
If I comment out the "#import random" then I am using the
10ths-milliseconds of the time to get a random tip
tip = int(time.time()*100)%len(TipDialog.tips)
then at the exit I get NO error message at all.
There should be some memory leak either on the random or on the PhotoImage?
Regards
Vasilis
begin:vcard
fn:Vasilis Vlachoudis
n:Vlachoudis;Vasilis
org:CERN;AB
adr:CERN;;Dep.AB;Geneva-23;;CH-1211;Switzerland
email;internet:[EMAIL PROTECTED]
title:Dr
tel;work:+41-22-767.9851
tel;fax:+41-22-767.7555
tel;cell:+41-76-487.4378
x-mozilla-html:FALSE
url:http://home.cern.ch/bnv
version:2.1
end:vcard
_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss