<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> import warnings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> Image = None <EOL> _imaging = None <EOL> ImageFile = None <EOL> def _detect_image_library ( ) : <EOL> global Image <EOL> global _imaging <EOL> global ImageFile <EOL> if Image is not None : <EOL> return Image , _imaging , ImageFile <EOL> PIL_imaging = False <EOL> try : <EOL> from PIL import Image as PILImage <EOL> except ImportError as err : <EOL> try : <EOL> import Image as PILImage <EOL> except ImportError as err : <EOL> raise ImproperlyConfigured ( <EOL> _ ( "<STR_LIT>" ) % err <EOL> ) <EOL> if hasattr ( PILImage , '<STR_LIT>' ) : <EOL> PIL_imaging = False <EOL> else : <EOL> import platform <EOL> if platform . python_implementation ( ) . lower ( ) == '<STR_LIT>' : <EOL> try : <EOL> from PIL import _imaging as PIL_imaging <EOL> except ImportError : <EOL> try : <EOL> import _imaging as PIL_imaging <EOL> except ImportError as err : <EOL> raise ImproperlyConfigured ( <EOL> _ ( "<STR_LIT>" <EOL> "<STR_LIT>" ) % err <EOL> ) <EOL> try : <EOL> from PIL import ImageFile as PILImageFile <EOL> except ImportError : <EOL> import ImageFile as PILImageFile <EOL> if PIL_imaging is not False : <EOL> warnings . warn ( <EOL> "<STR_LIT>" + <EOL> "<STR_LIT>" , <EOL> PendingDeprecationWarning <EOL> ) <EOL> return PILImage , PIL_imaging , PILImageFile <EOL> Image , _imaging , ImageFile = _detect_image_library ( ) </s>
