[Image-SIG] Another bug not yet fixed in 1.1 (PIL as a package)

Bernhard Herzog herzog@online.de
14 Jun 2000 00:34:27 +0200


Digging deeply into my Image-SIG archives to September 1999....

"Fredrik Lundh" <fredrik@pythonware.com> writes:

> > I read somewhere that the current PIL release should work
> > equally well as plain modules (with PIL.pth) or as a package.
> > I may have misunderstood this, but the only problem I found
> > should be fairly easy to fix. The preinit() and init() methods
> > search for the plug-ins on sys.path. This fails if PIL is
> > installed as a package (I was fooled myself first, because I
> > still had a non-package installation around on my system...).
> 
> Anthony Baxter pointed this out a while ago, and
> Fred Drake came up with the following solution:
> 
>     import sys
>     try:
>         path = __path__
>     except NameError:
>         path = sys.path
> 
> which will be in the forthcoming maintenance
> release (PIL 1.0.1).

This isn't even fixed in 1.1!


-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
herzog@online.de  | http://sketch.sourceforge.net/