Permalink
Browse files

Workaround for PIL's ambiguious import method and/or easy_install PIL…

… packaging problem.

PIL documents two different way to import it's modules:
* import Image (http://www.pythonware.com/library/pil/handbook/introduction.htm)
* from PIL import Image (http://www.pythonware.com/library/pil/handbook/image.htm)

The same problem was noted in Django at https://code.djangoproject.com/ticket/6054
  • Loading branch information...
mat128 committed Nov 23, 2012
1 parent 75ce577 commit 15c367ffb499daab3cdf9dace618bd484bc38103
Showing with 7 additions and 2 deletions.
  1. +7 −2 libmproxy/console/contentview.py
@@ -1,7 +1,12 @@
import re, cStringIO, traceback, json
import urwid
from PIL import Image
from PIL.ExifTags import TAGS
try: from PIL import Image
except ImportError: import Image
try: from PIL.ExifTags import TAGS
except ImportError: from ExifTags import TAGS
import lxml.html, lxml.etree
import netlib.utils
import common

0 comments on commit 15c367f

Please sign in to comment.