PIL import

Tech talk for MV3D developers or those looking to lend a hand.

Moderator: SirGolan

PIL import

Postby jhamel » Mon Sep 05, 2011 11:30 am

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
jhamel
 
Posts: 17
Joined: Fri Jul 15, 2011 11:07 am

Re: PIL import

Postby SirGolan » Mon Sep 05, 2011 2:55 pm

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
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron