Page 1 of 1

PIL import

PostPosted: Mon Sep 05, 2011 11:30 am
by jhamel
Hi all,
I change this in the sourcecode to get it to work on my gentoo Linux, perhaps it is also in some other LINUX Distris a problem.
At gentoo the Image import works only as from PIL import Image

So I change at file mv3d/client/view/visual.py:
Code: Select all
try:
    from Image import fromstring, FLIP_TOP_BOTTOM
except ImportError:
    try:
        from PIL.Image import fromstring, FLIP_TOP_BOTTOM
    except:
        fromstring = None
        FLIP_TOP_BOTTOM = None
        print "WARNING: PIL is not available!"


and so on.

bye,
Juergen

Re: PIL import

PostPosted: Mon Sep 05, 2011 2:55 pm
by SirGolan
jhamel wrote:I change this in the sourcecode to get it to work on my gentoo Linux, perhaps it is also in some other LINUX Distris a problem. At gentoo the Image import works only as from PIL import Image


Thanks for catching that! It's from the checkin where I added splat support to textures in Panda. I'll make that change ASAP. I forget that the import path for PIL is different on Linux, and the continuous integration unit test job only runs on a Linux box that doesn't have Ogre or Panda installed.

Thanks!

Mike