[Image-SIG] "Pil" module information.

t v flytv1@yahoo.com
Tue, 10 Apr 2001 12:20:42 -0700 (PDT)


To: image-sig@python.org

Hi.
I am in the process of  learning Python and I would
like to use the "Pil" module. I have Python Ver.
2.1a2, from "..Python.org" and I downloaded "Pil" for
this version, and I am using it on a Win98SE as an OS.
I unzipped the module in the main path C:\Python21 and
copied _imaging.pyd into the Dll subdirectory and file
"pil.pth" into C:\Python21 . When I try to draw a
line, see program below, I get a message:
Traceback (most recent call last):
  File "C:\Python21\Tools\idle\linedraw.py", line 1,
in ?
    import Image, ImageDraw
  File "c:\python21\Image.py", line 56, in ?
    import ImagePalette
ImportError: No module named ImagePalette

I see a module named "imagepal.py" in the
C:\Python21\Pil, subdirectory and this is defined as
class ImagePalette: and I am sure this is what it's
needed to make it work. I used a number of other
programming languages in the past and I would like to
get a package together that I could use with Python, 
but it gets to be more difficult than I anticipated.
There are a lot of Plugins/Modules, but they all seem
to be incompatible, wrong versions etc.
  If you know of a package that I can download that
would allow me to "open a file, read data, get
coordinates, (XY) and draw lines between them " it is
all I am trying to accomplish for now, I would greatly
appreciate it. I keep going back to "C" and I know
that Python would be more efficient to use in many
cases, but it appears to be somewhat difficult right
now, at least for Win98SE, OS.

The program I ran:

import Image, ImageDraw
im = Image.open("test.gm")
draw = ImageDraw.Draw(im)
draw.line((0, 0), im.size, fill=128)
draw.line((0, im.size[1]), (im.size[0], 0), fill=128)

Thanks for your effort. Tiberiu Vela (T.V.)


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/