Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aclark4life committed Mar 7, 2013
1 parent de957b6 commit 3020c16
Show file tree
Hide file tree
Showing 72 changed files with 111 additions and 111 deletions.
4 changes: 2 additions & 2 deletions PIL/ArgImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

__version__ = "0.4"

from . import Image, ImageFile, ImagePalette
from PIL import Image, ImageFile, ImagePalette

from .PngImagePlugin import i8, i16, i32, ChunkStream, _MODES
from PIL.PngImagePlugin import i8, i16, i32, ChunkStream, _MODES

MAGIC = b"\212ARG\r\n\032\n"

Expand Down
4 changes: 2 additions & 2 deletions PIL/BdfFontFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# See the README file for information on usage and redistribution.
#

from . import Image
from . import FontFile
from PIL import Image
from PIL import FontFile


# --------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion PIL/BmpImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__version__ = "0.7"


from . import Image, ImageFile, ImagePalette, _binary
from PIL import Image, ImageFile, ImagePalette, _binary

i8 = _binary.i8
i16 = _binary.i16le
Expand Down
2 changes: 1 addition & 1 deletion PIL/BufrStubImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile
from PIL import Image, ImageFile

_handler = None

Expand Down
2 changes: 1 addition & 1 deletion PIL/CurImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

__version__ = "0.1"

from . import Image, BmpImagePlugin, _binary
from PIL import Image, BmpImagePlugin, _binary


#
Expand Down
4 changes: 2 additions & 2 deletions PIL/DcxImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

__version__ = "0.2"

from . import Image, _binary
from PIL import Image, _binary

from .PcxImagePlugin import PcxImageFile
from PIL.PcxImagePlugin import PcxImageFile

MAGIC = 0x3ADE68B1 # QUIZ: what's this value, then?

Expand Down
2 changes: 1 addition & 1 deletion PIL/EpsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import re
import io
from . import Image, ImageFile, _binary
from PIL import Image, ImageFile, _binary

#
# --------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion PIL/FitsStubImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile
from PIL import Image, ImageFile

_handler = None

Expand Down
2 changes: 1 addition & 1 deletion PIL/FliImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

__version__ = "0.2"

from . import Image, ImageFile, ImagePalette, _binary
from PIL import Image, ImageFile, ImagePalette, _binary

i8 = _binary.i8
i16 = _binary.i16le
Expand Down
2 changes: 1 addition & 1 deletion PIL/FontFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

import os
from . import Image, _binary
from PIL import Image, _binary

import marshal

Expand Down
4 changes: 2 additions & 2 deletions PIL/FpxImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
__version__ = "0.1"


from . import Image, ImageFile
from .OleFileIO import *
from PIL import Image, ImageFile
from PIL.OleFileIO import *


# we map from colour field tuples to (mode, rawmode) descriptors
Expand Down
2 changes: 1 addition & 1 deletion PIL/GbrImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile, _binary
from PIL import Image, ImageFile, _binary

i32 = _binary.i32be

Expand Down
2 changes: 1 addition & 1 deletion PIL/GdImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

__version__ = "0.1"

from . import ImageFile, ImagePalette, _binary
from PIL import ImageFile, ImagePalette, _binary

try:
import builtins
Expand Down
2 changes: 1 addition & 1 deletion PIL/GifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
__version__ = "0.9"


from . import Image, ImageFile, ImagePalette, _binary
from PIL import Image, ImageFile, ImagePalette, _binary


# --------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion PIL/GimpGradientFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#

from math import pi, log, sin, sqrt
from ._binary import o8
from PIL._binary import o8

# --------------------------------------------------------------------
# Stuff to translate curve segments to palette values (derived from
Expand Down
2 changes: 1 addition & 1 deletion PIL/GimpPaletteFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

import re
from ._binary import o8
from PIL._binary import o8

##
# File handler for GIMP's palette format.
Expand Down
2 changes: 1 addition & 1 deletion PIL/GribStubImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile
from PIL import Image, ImageFile

_handler = None

Expand Down
2 changes: 1 addition & 1 deletion PIL/Hdf5StubImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile
from PIL import Image, ImageFile

_handler = None

Expand Down
2 changes: 1 addition & 1 deletion PIL/IcnsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFile, _binary
from PIL import Image, ImageFile, _binary
import struct

i8 = _binary.i8
Expand Down
2 changes: 1 addition & 1 deletion PIL/IcoImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

__version__ = "0.1"

from . import Image, BmpImagePlugin, _binary
from PIL import Image, BmpImagePlugin, _binary


#
Expand Down
4 changes: 2 additions & 2 deletions PIL/ImImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
__version__ = "0.7"

import re
from . import Image, ImageFile, ImagePalette
from ._binary import i8, o8
from PIL import Image, ImageFile, ImagePalette
from PIL._binary import i8, o8


# --------------------------------------------------------------------
Expand Down
26 changes: 13 additions & 13 deletions PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def __getattr__(self, id):
import __builtin__
builtins = __builtin__

from . import ImageMode
from ._binary import i8, o8
from PIL import ImageMode
from PIL._binary import i8, o8

import os, sys

Expand Down Expand Up @@ -279,23 +279,23 @@ def preinit():
return

try:
from . import BmpImagePlugin
from PIL import BmpImagePlugin
except ImportError:
pass
try:
from . import GifImagePlugin
from PIL import GifImagePlugin
except ImportError:
pass
try:
from . import JpegImagePlugin
from PIL import JpegImagePlugin
except ImportError:
pass
try:
from . import PpmImagePlugin
from PIL import PpmImagePlugin
except ImportError:
pass
try:
from . import PngImagePlugin
from PIL import PngImagePlugin
except ImportError:
pass
# try:
Expand Down Expand Up @@ -453,7 +453,7 @@ def _new(self, im):
new.size = im.size
new.palette = self.palette
if im.mode == "P":
from . import ImagePalette
from PIL import ImagePalette
new.palette = ImagePalette.ImagePalette()
try:
new.info = self.info.copy()
Expand Down Expand Up @@ -1025,7 +1025,7 @@ def offset(self, xoffset, yoffset=None):
"'offset' is deprecated; use 'ImageChops.offset' instead",
DeprecationWarning, stacklevel=2
)
from . import ImageChops
from PIL import ImageChops
return ImageChops.offset(self, xoffset, yoffset)

##
Expand Down Expand Up @@ -1092,7 +1092,7 @@ def paste(self, im, box=None, mask=None):
box = box + (box[0]+size[0], box[1]+size[1])

if isStringType(im):
from . import ImageColor
from PIL import ImageColor
im = ImageColor.getcolor(im, self.mode)

elif isImageType(im):
Expand Down Expand Up @@ -1238,7 +1238,7 @@ def putdata(self, data, scale=1.0, offset=0.0):

def putpalette(self, data, rawmode="RGB"):
"Put palette data into an image."
from . import ImagePalette
from PIL import ImagePalette

if self.mode not in ("L", "P"):
raise ValueError("illegal image mode")
Expand Down Expand Up @@ -1772,7 +1772,7 @@ def new(mode, size, color=0):
if isStringType(color):
# css3-style specifier

from . import ImageColor
from PIL import ImageColor
color = ImageColor.getcolor(color, mode)

return Image()._new(core.fill(mode, size, color))
Expand Down Expand Up @@ -2165,5 +2165,5 @@ def _show(image, **options):
_showxv(image, **options)

def _showxv(image, title=None, **options):
from . import ImageShow
from PIL import ImageShow
ImageShow.show(image, title, **options)
2 changes: 1 addition & 1 deletion PIL/ImageChops.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image
from PIL import Image

##
# The <b>ImageChops</b> module contains a number of arithmetical image
Expand Down
6 changes: 3 additions & 3 deletions PIL/ImageCms.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

# --------------------------------------------------------------------.

from . import Image
from PIL import Image
import _imagingcms

core = _imagingcms
Expand Down Expand Up @@ -207,7 +207,7 @@ def apply_in_place(self, im):
def get_display_profile(handle=None):
import sys
if sys.platform == "win32":
from . import ImageWin
from PIL import ImageWin
if isinstance(handle, ImageWin.HDC):
profile = core.get_display_profile_win32(handle, 1)
else:
Expand Down Expand Up @@ -771,7 +771,7 @@ def versions():
if __name__ == "__main__":
# create a cheap manual from the __doc__ strings for the functions above

from . import ImageCms
from PIL import ImageCms
print(__doc__)

for f in dir(pyCMS):
Expand Down
2 changes: 1 addition & 1 deletion PIL/ImageColor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image
from PIL import Image
import re


Expand Down
6 changes: 3 additions & 3 deletions PIL/ImageDraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageColor
from PIL import Image, ImageColor

try:
import warnings
Expand Down Expand Up @@ -127,7 +127,7 @@ def setfont(self, font):
def getfont(self):
if not self.font:
# FIXME: should add a font repository
from . import ImageFont
from PIL import ImageFont
self.font = ImageFont.load_default()
return self.font

Expand Down Expand Up @@ -318,7 +318,7 @@ def getdraw(im=None, hints=None):
except ImportError:
pass
if handler is None:
from . import ImageDraw2
from PIL import ImageDraw2
handler = ImageDraw2
if im:
im = handler.Draw(im)
Expand Down
2 changes: 1 addition & 1 deletion PIL/ImageDraw2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageColor, ImageDraw, ImageFont, ImagePath
from PIL import Image, ImageColor, ImageDraw, ImageFont, ImagePath

class Pen:
def __init__(self, color, width=1, opacity=255):
Expand Down
2 changes: 1 addition & 1 deletion PIL/ImageEnhance.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image, ImageFilter, ImageStat
from PIL import Image, ImageFilter, ImageStat

class _Enhance:

Expand Down
2 changes: 1 addition & 1 deletion PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# See the README file for information on usage and redistribution.
#

from . import Image
from PIL import Image
import traceback, os
import io

Expand Down
Loading

0 comments on commit 3020c16

Please sign in to comment.