mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 02:03:25 +03:00
Fix imports
This commit is contained in:
parent
3fc5e0c1b3
commit
fd81ee9336
|
@ -53,7 +53,7 @@ try:
|
||||||
# the "open" function to identify files, but you cannot load
|
# the "open" function to identify files, but you cannot load
|
||||||
# them. Note that other modules should not refer to _imaging
|
# them. Note that other modules should not refer to _imaging
|
||||||
# directly; import Image and use the Image.core variable instead.
|
# directly; import Image and use the Image.core variable instead.
|
||||||
from . import _imaging as core
|
from PIL import _imaging as core
|
||||||
except ImportError as v:
|
except ImportError as v:
|
||||||
core = _imaging_not_installed()
|
core = _imaging_not_installed()
|
||||||
if str(v)[:20] == "Module use of python" and warnings:
|
if str(v)[:20] == "Module use of python" and warnings:
|
||||||
|
|
|
@ -82,7 +82,7 @@ VERSION = "0.1.0 pil"
|
||||||
# --------------------------------------------------------------------.
|
# --------------------------------------------------------------------.
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from . import _imagingcms
|
from PIL import _imagingcms
|
||||||
|
|
||||||
core = _imagingcms
|
core = _imagingcms
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ def getdraw(im=None, hints=None):
|
||||||
handler = None
|
handler = None
|
||||||
if not hints or "nicest" in hints:
|
if not hints or "nicest" in hints:
|
||||||
try:
|
try:
|
||||||
from . import _imagingagg as handler
|
from PIL import _imagingagg as handler
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
if handler is None:
|
if handler is None:
|
||||||
|
|
|
@ -36,7 +36,7 @@ class _imagingft_not_installed:
|
||||||
raise ImportError("The _imagingft C module is not installed")
|
raise ImportError("The _imagingft C module is not installed")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from . import _imagingft as core
|
from PIL import _imagingft as core
|
||||||
except ImportError:
|
except ImportError:
|
||||||
core = _imagingft_not_installed()
|
core = _imagingft_not_installed()
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# extensions.)
|
# extensions.)
|
||||||
##
|
##
|
||||||
|
|
||||||
from . import _imaginggl
|
from PIL import _imaginggl
|
||||||
|
|
||||||
##
|
##
|
||||||
# Texture factory.
|
# Texture factory.
|
||||||
|
@ -25,4 +25,4 @@ from . import _imaginggl
|
||||||
class TextureFactory:
|
class TextureFactory:
|
||||||
pass # overwritten by the _imaginggl module
|
pass # overwritten by the _imaginggl module
|
||||||
|
|
||||||
from ._imaginggl import *
|
from PIL._imaginggl import *
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from . import _imagingmath
|
from PIL import _imagingmath
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -44,7 +44,7 @@ def _border(border):
|
||||||
|
|
||||||
def _color(color, mode):
|
def _color(color, mode):
|
||||||
if Image.isStringType(color):
|
if Image.isStringType(color):
|
||||||
from . import ImageColor
|
from PIL import ImageColor
|
||||||
color = ImageColor.getcolor(color, mode)
|
color = ImageColor.getcolor(color, mode)
|
||||||
return color
|
return color
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ class PhotoImage:
|
||||||
except tkinter.TclError as v:
|
except tkinter.TclError as v:
|
||||||
# activate Tkinter hook
|
# activate Tkinter hook
|
||||||
try:
|
try:
|
||||||
from . import _imagingtk
|
from PIL import _imagingtk
|
||||||
try:
|
try:
|
||||||
_imagingtk.tkinit(tk.interpaddr(), 1)
|
_imagingtk.tkinit(tk.interpaddr(), 1)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user