[Image-SIG] Question about ImageDraw.Draw function

Chris Cogdon chris at cogdon.org
Tue Aug 26 15:55:24 EDT 2003

Aha... was looking at the wrong version of PIL. From 1.1.4's Image.py version:

    # If the _imaging C module is not present, you can still use
    # the "open" function to identify files, but you cannot load
    # them.  Note that other modules should not refer to _imaging
    # directly; import Image and use the Image.core variable instead.
    import _imaging
    core = _imaging
    del _imaging
except ImportError, v:
    import string
    core = _imaging_not_installed()
    if str(v)[:20] == "Module use of python":
        # The _imaging C module is present, but not compiled for
        # the right version (windows only).  Print a warning, if
        # possible.
            import warnings
                "The _imaging extension was built for another version "
                "of Python; most PIL functions will be disabled",
        except (ImportError, NameError, AttributeError):
            pass # sorry

This seems the likely culprit. If true, then it's likely you're using a 
version of python different from what the _imaging module was compiled 

If it IS true, then I'm surprised you're not seeing the warning. (It's not a 
very robust way of handling the warning, though ;)

   ("`-/")_.-'"``-._        Chris Cogdon <chris at cogdon.org>
    . . `; -._    )-;-,_`)
   (v_,)'  _  )`-.\  ``-'
  _.- _..-_/ / ((.'
((,.-'   ((,/   fL

More information about the Image-SIG mailing list