[Zope] - Name clashes (PIL vs Zope)...

Andy Smith andy.smith@iname.com
Sun, 31 Jan 1999 01:00:17 -0500


Hi Again,

Thanks for the various replies I got to this!

I've gone down the 'Packaging' route and this seems to have done the trick.
I created a PIL directory in the python path, then inserted an __init__.py,
which does nothing but import the required modules.

So in the product I can now access PIL modules using PIL.Image and
PIL.ImageFile etc. Maintaining an __init__.py file is certainly something I
can live with.

I think PIL and Zope can be put to good use with each other .. storing the
GIF using a StringIO instead of a file worked fine, so it'll be possible to
generate GIFs on the fly without them having to have ever existed on the
filesystem... nice!

Cheers again,

Andy.

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy
> Smith
> Sent: Thursday, January 28, 1999 10:02 PM
> To: Zope; fredrik@pythonware.com
> Subject: [Zope] - Name clashes (PIL vs Zope)...
>
>
> Hi All,
>
> I'm writing a new Product which uses the Python Imaging Library to
> dynamically generate GIFs. I'm dying to see if it can be done by using
> StringIO's to store the image data so that no actual files will need to be
> written, but I've come across a snag... PIL and Zope both make use of the
> module names 'Image.py' and 'ImageFile.py'. I guess great minds do indeed
> think alike ;)
>
> My first instinct was to use sed to churn through the whole of
> PIL renaming
> all references to Image and ImageFile to pilImage and pilImageFile
> respectively. I'm wondering if there's a more elegant way of doing it?
> What's 'unzenlike' with this solution is that every time PIL or Zope gets
> updated, the whole process will have to be done again.
>
> Before I go delving in, does anyone know if creating a PIL 'package' could
> easily fix this, or is this going to be even more work than
> simply renaming
> the offending modules?
>
> Cheers,
>
> Andy.
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www2.zope.org/mailman/listinfo/zope
>