Newbie question on Tkinter

Fredrik Lundh fredrik at pythonware.com
Mon Jul 8 17:19:58 EDT 2002


Michele Simionato wrote:

> I have found a confusing (to me) behavior of Tkinter in
> displaying GIF images.

it's a "feature", sort of -- Tkinter doesn't hang on to PhotoImage
objects (they're just things that can be converted to strings), so
Python's garbage collector might decide to remove them.

for a bit more information, see:

    http://effbot.org/zone/tkinter-photoimage.htm

this is also discussed in the Python FAQ:

    http://www.python.org/doc/FAQ.html#4.69

> P.S. BTW, how to display jpeg images ?

PIL can help.  follow the effbot.org link above for an
example.

</F>

<!-- (the eff-bot guide to) the python standard library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->





More information about the Python-list mailing list