Interesting PIL display problem

Paul Fredrickson p_fredrickson at hotmail.com
Sat Jan 13 02:19:02 EST 2001


I'm running python 2.0, tcl/tk 8.3 on windows me, with PIL 1.1, but I
haven't been able to get this simple code snippet to work:

import Tkinter,Image,ImageTk
root=Tkinter.Tk()
im=Image.open("test.gif")
photo=ImageTk.PhotoImage(im)
...
in the hopes that I can then do something like
c=Canvas(root)
c.create_image(10,10,image=photo)

but I don't get a chance.  The exact error message says it can't find the
_imagingtk module, even
though the distribution I got didn't include one. (Even one it was
supposedly tested with python 2.0).
Anyway, I went and downloaded the PIL source, and built the _imageingtk
module, but I'm not sure I built it right, because then it finds it and
coughs with a DLL load error.  I'm not sure how to test if that's because it
can't find init_imagingtk(...), or because of some error later on.  I've
also tried earlier versions of python (1.5.2) with earlier versions of PIL
(1.0), but I can't shake the feeling that I'm doing something fundamentally
wrong.  Does it work for anyone else?

I'd like to test it on linux, but my linux partitions been hosed for a
couple weeks, and I can't find my install cd's.

Suggestions?  Pointers?  More appropriate forums?
Any help would be appreciated.

Paul Fredrickson
pbf2 at email.byu.edu, p_fredrickson at hotmail.com,






More information about the Python-list mailing list