Fix PIL imports on OS X

This commit is contained in:
Kovid Goyal 2009-05-31 20:23:22 -07:00
parent 029fd0b3ac
commit 5a8f5726bf
4 changed files with 34 additions and 15 deletions

View File

@ -11,7 +11,12 @@ __docformat__ = 'restructuredtext en'
import struct
import zlib
import Image
try:
from PIL import Image
Image
except ImportError:
import Image
import cStringIO
from calibre.ebooks.pdb.formatwriter import FormatWriter

View File

@ -6,7 +6,12 @@ __docformat__ = 'restructuredtext en'
import os
import Image
try:
from PIL import Image
Image
except ImportError:
import Image
import cStringIO
from calibre.customize.conversion import OutputFormatPlugin

View File

@ -1,4 +1,3 @@
import os.path
# -*- coding: utf-8 -*-
__license__ = 'GPL 3'
@ -9,7 +8,12 @@ import os
import struct
import zlib
import Image
try:
from PIL import Image
Image
except ImportError:
import Image
import cStringIO
from calibre.ebooks.rb.rbml import RBMLizer

View File

@ -11,7 +11,12 @@ Transform OEB content into RTF markup
import os
import re
import Image
try:
from PIL import Image
Image
except ImportError:
import Image
import cStringIO
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, barename, namespace, \