Changeset 5399


Ignore:
Timestamp:
19/06/09 13:18:49 (10 years ago)
Author:
domlowe
Message:

Changing PIL imports in cows

Location:
cows/trunk/cows
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/wcs_controller.py

    r5110 r5399  
    2323log = logging.getLogger(__name__) 
    2424 
    25 import Image 
     25 
    2626from genshi.template import TextTemplate 
    2727 
  • cows/trunk/cows/pylons/wfs_controller.py

    r5173 r5399  
    2121log = logging.getLogger(__name__) 
    2222 
    23 import Image 
    2423 
    2524from cows.model.wfs import WfsFeatureSummary 
  • cows/trunk/cows/pylons/wms_controller.py

    r5202 r5399  
    2424log = logging.getLogger(__name__) 
    2525 
    26 import Image 
     26try:  
     27    from PIL import Image 
     28except ImportError: 
     29    import Image 
     30 
    2731from genshi.template import NewTextTemplate 
    2832 
  • cows/trunk/cows/service/imps/csmlbackend/wms_csmllayer.py

    r5367 r5399  
    1717    import cdms 
    1818from cows.service.imps.csmlbackend.config import config 
    19 import Image 
     19try:  
     20    from PIL import Image, ImageFont, ImageDraw 
     21except ImportError: 
     22    import Image, ImageFont, ImageDraw 
    2023from copy import copy 
    2124from cows.service.imps.pywms.render_imp import RGBARenderer 
     
    2629import numpy 
    2730from MA import array 
    28 import Image, ImageFont, ImageDraw 
    2931from cows.service.wms_iface import IwmsLayer, IwmsDimension, IwmsLayerSlab 
    3032from cows.service.imps.csmlbackend.csmlcommon import CSMLLayerMapper, CSMLConnector 
  • cows/trunk/cows/service/imps/pywms/figure.py

    r4912 r5399  
    1919import pylab as p 
    2020from matplotlib import cm 
    21 import Image 
     21try:  
     22    from PIL import Image 
     23except ImportError: 
     24    import Image 
    2225import Numeric as N 
    2326import MA 
  • cows/trunk/cows/service/imps/pywms/impl.py

    r4912 r5399  
    2525 
    2626from cStringIO import StringIO 
    27 import Image 
     27try:  
     28    from PIL import Image 
     29except ImportError: 
     30    import Image 
    2831 
    2932import logging 
  • cows/trunk/cows/service/imps/pywms/render_imp.py

    r5365 r5399  
    1313 
    1414from view import GridRenderer 
    15 import ImageColor, Image 
     15try:  
     16    from PIL import Image, ImageColor 
     17except ImportError: 
     18    import Image, ImageColor 
     19 
    1620import numpy as N 
    1721import logging 
  • cows/trunk/cows/service/imps/wms_gdal.py

    r4912 r5399  
    2121from osgeo import osr, gdal 
    2222 
    23 import Image 
     23try:  
     24    from PIL import Image 
     25except ImportError: 
     26    import Image 
    2427 
    2528import logging 
  • cows/trunk/cows/service/imps/wms_layers.py

    r4912 r5399  
    1212import os 
    1313import cdms2 as cdms 
    14 import Image 
     14try:  
     15    from PIL import Image 
     16except ImportError: 
     17    import Image 
    1518from copy import copy 
    1619from pointrenderer import PointRenderer 
  • cows/trunk/cows/test/iface_test_lib.py

    r4912 r5399  
    1212 
    1313import unittest 
    14 import Image 
     14try: 
     15    from PIL import Image 
     16except ImportError: 
     17    import Image 
    1518 
    1619def assert_iterable(a): 
Note: See TracChangeset for help on using the changeset viewer.