[Image-SIG] PIL 1.0 as a package

Fred L. Drake, Jr. Fred L. Drake, Jr." <fdrake@acm.org
Tue, 24 Aug 1999 10:26:14 -0400 (EDT)


  I have a question about the use of PIL as a package.
  The instructions in the 1.0 source release describe an installation
which is *almost* a package style installation, with the caveat that
it remains accessible without the package-style import due to the
PIL.pth file.
  Removing the PIL.pth file seems to work just fine for requiring
package-style imports, which I'm happy with.  Is this the expectation
for package use of PIL, or is the intent of using a subdir of
site-packages/ simply to keep the files together?  I noticed that
PIL.Image.init() still simply uses sys.path to search for
*ImagePlugin.py; should it do something like:

	try:
            path = __path__
        except NameError:
            path = sys.path
        for p in path:
            ...

This could at least speed the search when PIL is being used as a
package.
  When linking the Tk interface code into _imaging.so (which I think
is a bad idea still), the X11 library also needs to be linked in (and
must be dynamically linked so there's only one copy, shared with
_tkinter); that's not done in the Setup.in as distributed.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives